Compilation of both classes will fail.
Compilation of both classes will succeed.
Compilation of class a will fail. Compilation of class b will succeed.
Compilation of class a will fail. Compilation of class a will succeed.
第1题:
The particular event instance.
The source of the event.
The set of events that were triggered by the same action.
The type of event.
The type of component from which the event originated.
第2题:
public void main(String args[])
public void static main(String args[])
public static main(String[] argv)
final public static void main(String [] array)
public static void main(String args[])
第3题:
Public
Private
Protected
Transient
No access modifier is qualified
第4题:
0
1
14
–15
An error at line 3 causes compilation to fail.
An error at line 4 causes compilation to fail.
第5题:
It prints f2[0] = 0.0
It prints f2[0] = NaN
An error at line 5 causes compile to fail.
An error at line 6 causes compile to fail.
An error at line 6 causes an exception at runtime.
第6题:
Compilation will fail.
Compilation will succeed and the program will print “0”
Compilation will succeed and the program will print “1”
Compilation will succeed and the program will print “2”
第7题:
Compilation fails.
An exception is thrown at runtime.
doStuffx = 6 main x = 6
doStuffx = 6 main x = 7
doStuffx = 7 main x = 6
doStuffx = 7 main x = 7
第8题:
Finally
Compilation fails.
The code runs with no output.
An exception is thrown at runtime.
第9题:
Compilation succeeds and 1 is printed.
Compilation succeeds and 2 is printed.
An error at line 8 causes compilation to fail.
An error at line 14 causes compilation to fail.
Compilation succeeds but an exception is thrown at line 14.
第10题:
Float foo = -1;
Float foo = 1.0;
Float foo = 42e1;
Float foo = 2.02f;
Float foo = 3.03d;
Float foo = 0x0123;