class Test
{
public static void main(String[] args)
{
String foo=args[1];
String bar=args[2];
String baz=args[3];
}
}
d:\>java Test Red Green Blue
what is the value of baz?
A. baz has value of ""
B. baz has value of null
C. baz has value of "Red"
D. baz has value of "Blue"
E. baz has value of "Green"
F. the code does not compile
G. the program throw an exception 作者: 朱东方 时间: 2012-7-12 23:06 本帖最后由 朱东方 于 2012-7-12 23:13 编辑
第一题结果是:green blue
第一个输出的是green 第二个输出的是blue 第三个 角标越界了·