What is the result?()
A.test
B.null
C.An exception is thrown at runtime.
D.Compilation fails because of an error in line 1.
E.Compilation fails because of an error in line 4.
F.Compilation fails because of an error in line 5.
您可能感兴趣的试卷
你可能感兴趣的试题
Which code, inserted at line 14, allows the Sprite class to compile?()
A.Direction d = NORTH;
B.Nav.Direction d = NORTH;
C.Direction d = Direction.NORTH;
D.Nav.Direction d = Nav.Direction.NORTH;
Given a correctly compiled class whose source code is:
Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains "." (current directory).
Which command line correctly runs Commander?()
A.java Commander
B.java com.sun.sjcp.Commander
C.java com/sun/sjcp/Commander
D.java -cp com.sun.sjcp Commander
E.java -cp com/sun/sjcp Commander
A.put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java
B.put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java/*.jar
C.Put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java/Poker.jar
D.put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java
E.put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java/*.jar
F.put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java/Poker.jar
What is the result?()
A.s=14
B.s=16
C.s=10
D.Compilation fails.
E.An exception is thrown at runtime.
What two must the programmer do to correct the compilation errors?()
A.insert a call to this() in the Car constructor
B.insert a call to this() in the MeGo constructor
C.insert a call to super() in the MeGo constructor
D.insert a call to super(vin) in the MeGo constructor
E.change the wheelCount variable in Car to protected
F.change line 3 in the MeGo class to super.wheelCount=3
A.Tight coupling
B.Low cohesion
C.High cohesion
D.Loose coupling
E.Weak encapsulation
F.Strong encapsulation
What are four valid examples of polymorphic method calls?()
A.x.a2();
B.z.a2();
C.z.c1();
D.z.a1();
E.y.c1();
F.x.a1();
What is the result?()
A.peep
B.bark
C.meow
D.Compilation fails.
E.An exception is thrown at runtime.
What is the result?()
A.Afoo,Afoo
B.Afoo,Bfoo
C.Bfoo,Afoo
D.Bfoo,Bfoo
E.Compilation fails.
F.An exception is thrown at runtime.
Which three statements are true?()
A.Compilation fails.
B.The code compiles and the output is 2.
C.If lines 16, 17 and 18 were removed, compilation would fail.
D.If lines 24, 25 and 26 were removed, compilation would fail.
E.If lines 16, 17 and 18 were removed, the code would compile and the output would be 2.
F.If lines 24, 25 and 26 were removed, the code would compile and the output would be 1.
最新试题
What is the result?()
Which three changes should be made to adapt this class to be used safely by multiple threads?()
What is the result?()
A programmer must create a generic class MinMax and the type parameter of MinMax must implement Comparable. Which implementation of MinMax will compile?()
What is the result?()
Which statement is true about the set variable on line 12?()
Which statement is true?()
What is the result?()
What is the result?()
Which code, inserted at line 4, guarantees that this program will output [1, 2]?()