多项选择题X 纠错
A. void setVar (int a, int b, float c){ x = a; y = b; z = c; }
B. public void setVar(int a, float c, int b) { setVar(a, b, c); }
C. public void setVar(int a, float c, int b) { this(a, b, c); }
D. public void setVar(int a, float b){ x = a; z = b; }
E. public void setVar(int ax, int by, float cz) { x = ax; y = by; z = cz; }
你可能喜欢
单项选择题
A. Compilation succeeds and 4 is printed.
B. Compilation succeeds and 43 is printed.
C. An error on line 9 causes compilation to fail.
D. An error on line 14 causes compilation to fail.
E. Compilation succeeds but an exception is thrown at line 9.
多项选择题
A. Member data have no access modifiers.
B. Member data can be modified directly.
C. The access modifier for methods is protected.
D. The access modifier to member data is private.
E. Methods provide for access and modification of data.
单项选择题
A. An exception is thrown.
B. The code will not compile.
C. The program prints “null”
D. The program prints “blue”
E. The program prints “green”
单项选择题
A. An exception is thrown.
B. The program exists without printing anything.
C. An error at line 1 causes compilation to fail.
D. An error at line 6 causes the compilation to fail.
E. “Running” is printed and the program exits.
多项选择题
A. Exiting from a synchronized block.
B. Calling the wait method on an object.
C. Calling the notify method on an object.
D. Calling the notifyAll method on an object.
E. Calling the setPriority method on a thread object.
单项选择题
A. The program runs and prints “i=1, j=0”
B. The program runs and prints “i=1, j=4”
C. The program runs and prints “i=3, j=4”
D. The program runs and prints “i=3, j=0”
E. An error at line 4 causes compilation to fail.
F. An error at line 7 causes compilation to fail.
单项选择题
A. Value = 3
B. Value = 4
C. Value = 5
D. Value = 6
E. Value = 7
F. Value = 8
单项选择题
A. Throws Exception.
B. Catch (Exception e).
C. Throws RuntimeException.
D. Catch (TestException e).
E. No code is necessary.
单项选择题
A. Compilation will fail.
B. Compilation will succeed and the program will print “3”
C. Compilation will succeed but the program will throw a ClassCastException at line 6.
D. Compilation will succeed but the program will throw a ClassCastException at line 7.
多项选择题
A. Final void methoda() {}
B. Void final methoda() {}
C. Static void methoda() {}
D. Static final void methoda() {}
E. Final abstract void methoda() {}