有哪位高手能告诉我这个题目该怎么解释???
public class Test{
public static void main(String[] args){
String foo=args[1];
Sring bar=args[2];
String baz=args[3];
}
}
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
还有个题目:
float f=4.2F;
Float g=new Float(4.2F);
Double d=new Double(4.2);
Which are true?
A. f==g B. g==g C. d==f
D. d.equals(f) E d.equals(g) F. g.equals(4.2);
这个题目该怎么解释?希望大家发表