The description of the class and its purpose
A list of methods in its super class
A list of member variable
The class hierarchy
第1题:
$persons
TwoUsers
*point
this
_endline
第2题:
The value is 8
The value is 9
The value is 10
The value is 11
第3题:
long number = 345L;
long number = 0345;
long number = 0345L;
long number = 0x345L;
第4题:
Inconceivable!
Dizzying intellect!
The code runs with no output.
An exception is thrown at runtime.
Compilation fails because of an error in line 22.
第5题:
List myList = myArray.asList();
List myList = Arrays.asList(myArray);
List myList = new ArrayList(myArray);
List myList = Collections.fromArray(myArray);
第6题:
An encapsulated, public class promotes re-use.
Classes that share the same interface are always tightly encapsulated.
An encapsulated class allows subclasses to overload methods, but does NOT allow overriding methods.
An encapsulated class allows a programmer to change an implementation without affecting outside code.
第7题:
An exception is thrown.
The program exists without printing anything.
An error at line 1 causes compilation to fail.
An error at line 2 causes the compilation to fail.
“Running” is printed and the program exits.
第8题:
Char
Byte
Float
Double
Object
第9题:
long l = 4990;
int i = 4L;
float f = 1.1;
double d = 34.4;
double t = 0.9F;
第10题:
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.