单项选择题X 纠错
A. InsideOnew ei= eo.new InsideOn();
B. Eo.InsideOne ei = eo.new InsideOne();
C. InsideOne ei = EnclosingOne.new InsideOne();
D. EnclosingOne.InsideOne ei = eo.new InsideOne();
你可能喜欢
单项选择题
A. An instance of the Inner class can be constructed with “new Outer.Inner ()”
B. An instance of the inner class cannot be constructed outside of package foo.
C. An instance of the inner class can only be constructed from within the outer class.
D. From within the package bar, an instance of the inner class can be constructed with “new inner()”
多项选择题
A. public interface Person { } public class Employee extends Person { }
B. public interface Shape { } public class Employee extends Shape { }
C. public interface Color { } public class Employee extends Color { }
D. public class Species { } public class Animal (private Species species;)
E. interface Component { } Class Container implements Component ( Private Component[ ] children; )
多项选择题
A. Private void setVar (int a, float c, int b) { }
B. Protected void setVar (int a, int b, float c) { }
C. Public int setVar (int a, float c, int b) (return a;)
D. Public int setVar (int a, int b, float c) (return a;)
E. Protected float setVar (int a, int b, float c) (return c;)
多项选择题
A. ConstOver ( ) { }
B. Protected int ConstOver ( ) { }
C. Private ConstOver (int z, int y, byte x) { }
D. Public Object ConstOver (int x, int y, int z) { }
E. Public void ConstOver (byte x, byte y, byte z) { }
单项选择题
A. Compilation will fail.
B. The program prints “0”.
C. The program prints “3”.
D. Compilation will succeed but an exception will be thrown at line 3.
填空题
Public class test (
Public static void stringReplace (String text) (
Text = text.replace (‘j’ , ‘i’);
)
public static void bufferReplace (StringBuffer text) (
text = text.append (“C”)
)
public static void main (String args[]} (
String textString = new String (“java”);
StringBuffer text BufferString = new StringBuffer (“java”);
stringReplace (textString);
BufferReplace (textBuffer);
System.out.printLn (textString + textBuffer);
)
)
What is the output?()
填空题
Public class test (
Public static void main (String args[]) (
System.out.printIn (6 ^ 3);
)
)
What is the output?()
单项选择题
A. The program prints “0”
B. The program prints “4”
C. The program prints “8”
D. The program prints “12”
E. The code does not complete.
多项选择题
A. (i ==1)
B. (i == d)
C. (d == 1)
D. (i.equals (d))
E. (d.equals (i))
F. (i.equals (42)
单项选择题
A. 0
B. 1
C. 14
D. –15
E. An error at line 3 causes compilation to fail.
F. An error at line 4 causes compilation to fail.