2011年JAVA认证模拟题(40)
Q118 Which of the following are true about local inner classes?A They are not associated with an instance of an outer (enclosing) class.
B They may access final initialized variables and parameters that are in the scope of the statement block in which the class is declared.
C They may be declared public, protected, or private.
D They may not implement an interface.
Q119 Which of the following are true?
A A reference to an array can be cast to a reference to an Object.
B A reference to an array can be cast to a reference to a Cloneable.
C A reference to an array can be cast to a reference to a String.
D None of the above.
Q120 What is the output of the following program?
public class Question {
public static void main (String args[])
{
boolean[] b = new boolean;
double[] d = new double;
System.out.print(b);
System.out.println(d);
}
}
A true0.0
B true0
C false0.0
D false0
Q118 AB
Q119 AB
Q120 C
页:
[1]