Final int k = 4;
Public int k = 4;
Static int k = 4;
Private int k = 4;
Abstract int k = 4;
Volatile int k = 4;
Transient int k = 4;
Protected int k = 4;
第1题:
public interface Foo{ int k = 4; } Which three are equivalent to line 2?()
第2题:
public interface Foo { int k = 4; 3. } Which three are equivalent to line 2?()
第3题:
Given: 1. public interface Foo { 2. int k = 4: 3. } Which three are equivalent to line 2?()
第4题:
11. public interface Status { 12. /* insert code here */ int MY_VALUE = 10; 13. } Which three are valid on line 12?()
第5题:
interface foo { int k = 0; } public class test implements Foo ( public static void main(String args) ( int i; Test test = new test (); i= test.k; i= Test.k; i= Foo.k; ) ) What is the result? ()
第6题:
Given 11.public interface Status { 12./* insert code here */ int MY_VALUE = 10; 13.} Which three are valid on line 12?()
第7题:
Compilation fails.
The code compiles and the output is 2.
If lines 16, 17 and 18 were removed, compilation would fail.
If lines 24, 25 and 26 were removed, compilation would fail.
If lines 16, 17 and 18 were removed, the code would compile and the output would be 2.
If lines 24, 25 and 26 were removed, the code would compile and the output would be 1.
第8题:
Foo { public int bar() { return 1; } }
new Foo { public int bar() { return 1; } }
newFoo() { public int bar(){return 1; } }
new class Foo { public int bar() { return 1; } }
第9题:
Final int k = 4;
Public int k = 4;
Static int k = 4;
Private int k = 4;
Abstract int k = 4;
Volatile int k = 4;
Transient int k = 4;
Protected int k = 4;
第10题:
final int k = 4:
public int k = 4:
static int k = 4:
private int k = 4:
abstract int k = 4:
volatile int k = 4:
transient int k = 4:
protected int k = 4:
第11题:
(a ==c)
(d ==e)
(b ==d)
(a ==b)
(b ==c)
(d ==10.0)
第12题:
public void foo() { }
public int foo() { return 3; }
public Two foo() { return this; }
public One foo() { return this; }
public Object foo() { return this; }
第13题:
class One { void foo() {} } class Two extends One { //insert method here } Which three methods, inserted individually at line 14, will correctly complete class Two?()
第14题:
class One { public One foo() { return this; } } class Two extends One { public One foo() { return this; } } class Three extends Two { // insert method here } Which two methods, inserted individually, correctly complete the Three class?()
第15题:
Which three form part of correct array declarations?()
第16题:
public interface Foo{ int k = 4; } Which three are equivalent to line 2? ()
第17题:
Given: 10. class One { 11. void foo() { } 12. } 13. class Two extends One { 14. //insert method here 15. } Which three methods, inserted individually at line 14, will correctly complete class Two?()
第18题:
Compilation succeeds.
An error at line 2 causes compilation to fail.
An error at line 9 causes compilation to fail.
An error at line 10 causes compilation to fail.
An error at line 11 causes compilation to fail.
第19题:
final int k = 4;
public int k = 4;
static int k = 4;
abstract int k = 4;
volatile int k = 4;
protected int k = 4;
第20题:
Compilation succeeds.
An error at line 2 causes compilation to fail.
An error at line 9 causes compilation to fail.
An error at line 10 causes compilation to fail.
An error at line 11 causes compilation to fail.
第21题:
Final int k = 4;
Public int k = 4;
Static int k = 4;
Private int k = 4;
Abstract int k = 4;
Volatile int k = 4;
第22题:
final
static
native
public
private
第23题:
Move the line 12 print statement into the foo() method.
Change line 7 to public synchronized void go() {.
Change the variable declaration on line 3 to private volatile int x;.
Wrap the code inside the foo() method with a synchronized( this ) block.
Wrap the for loop code inside the go() method with a synchronized block synchronized(this) { // for loop code here }.
第24题:
final
static
native
public
private
abstract
protected