单项选择题
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 -
单项选择题
Giventhefollowingsixmethodnames:(1)addListener(2)addMouseListener(3)setMouseListener(4)deleteMouseListener(5)removeMouseListener(6)registerMouseListenerHowmanyofthesemethodnamesfollowJavaBeanListenernamingrules?()
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; }
