What is the result?()
A.1,2,3
B.Compilation fails because of an error in line 12.
C.Compilation fails because of an error in line 13.
D.Compilation fails because of an error in line 14.
E.A ClassCastException is thrown at runtime.
您可能感兴趣的试卷
你可能感兴趣的试题
What is the result?()
A.TestA
B.TestB
C.Compilation fails.
D.An exception is thrown at runtime.
What is the result?()
A.Compilation succeeds.
B.Exactly one class does NOT compile.
C.Exactly two classes do NOT compile.
D.Exactly four classes do NOT compile.
E.Exactly three classes do NOT compile.
Which two classes correctly implement both the java.lang.Runnable and the java.lang.Cloneable interfaces?()
A.A
B.B
C.C
D.D
E.E
Which statement is true about the class of an object that can reference the variable base?()
A.It can be any class.
B.No class has access to base.
C.The class must belong to the geometry package.
D.The class must be a subclass of the class Hypotenuse.
What is the result?()
A.Compilation fails because of an error in line 3.
B.Compilation fails because of an error in line 7.
C.Compilation fails because of an error in line 9.
D.If you define D e = new E(),then e.bMethod() invokes the version of bMethod() defined in Line 5.
E.If you define D e = (D)(new E()),then e.bMethod() invokes the version of bMethod() defined in Line 5.
F.If you define D e = (D)(new E()),then e.bMethod() invokes the version of bMethod() defined in Line 9.
Which three are valid on line 12?()
A.final
B.static
C.native
D.public
E.private
F.abstract
G.protected
A.1
B.2
C.3
D.4
E.5
Which two methods, inserted independently at line 17, correctly complete the Sales class?()
A.double getSalesAmount() { return 1230.45; }
B.public double getSalesAmount() { return 1230.45; }
C.private double getSalesAmount() { return 1230.45; }
D.protected double getSalesAmount() { return 1230.45; }
Which two are true?()
A.The output is mm.
B.The output is mc.
C.Component is-a Meter.
D.Component has-a Meter.
E.DeluxeThingy is-a Component.
F.DeluxeThingy has-a Component.
Which three are valid?()
A.p0=p1;
B.p1=p2,
C.p2=p4;
D.p2=(ClassC)p1;
E.p1=(ClassB)p3;
F.p2=(ClassC)p4;
最新试题
Which statement is true about the set variable on line 12?()
Which two statements are true?()
Which statement is true?()
Which two can be results?()
What is the result?()
What is the result?()
What is the result?()
What is the result?()
Which three will compile and run without exception?()
Which two of statements are true?()