08 2016 档案
摘要:Given
an
arbitrary
ransom
note
string
and
another
string
containing
letters from
all
the
magazines,
write
a
function
that
will
return
true
if
the
ransom
note
can
be
constructed
from
the
magazines ;
otherwise,
it
will
return
false.
阅读全文
摘要:Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.
阅读全文
摘要:1、public char charAt(int index) 2、public int codePointAt(int index)
阅读全文
摘要:从JDK1.5之后,Java允许定义形参个数可变的参数,从而允许为方法制定数量不确定的形参。如果在定义方法时,在最后一个形参的类型后增加三点(...),则表明该形参可以接受多个参数值,多个参数值被当成数组传入。下面程序定义了一个形参个数可变的方法。 两种测试方法都包含一个名为str的形参,在两个方法
阅读全文
摘要:开发Java程序之前,需要在计算机行安装并配置Java开发环境。一种是直接安装Myeclipse,利用其自带的JDK编译运行;另一种是在我们的Windows或者Linux平台下安装JDK,配置环境变量。(随着JDK版本的更新,Myeclipse默认JDK是不变的,除非升级最新版的Myeclipse)
阅读全文

浙公网安备 33010602011771号