单项选择题
Given:
What is the result?()
A.Hello
B.Hello World
C.Compilation fails.
D.Hello World 5
E.The code runs with no output.
相关考题
-
多项选择题
Whichfourstatementsaretrue?()
A.Has-a relationships should never be encapsulated.
B.Has-a relationships should be implemented using inheritance.
C.Has-a relationships can be implemented using instance variables.
D.Is-a relationships can be implemented using the extends keyword.
E.Is-a relationships can be implemented using the implements keyword.
F.An array or a collection can be used to implement a one-to-many has-a relationship. -
多项选择题
Given: Which four code fragments, inserted independently at line 7, will compile?()
A.public void m1() { }
B.protected void m1() { }
C.private void m1() { }
D.void m2() { }
E.public void m2() { }
F.protected void m2() { } -
单项选择题
Given: What is the result?()
A.The code runs with no output.
B.An exception is thrown at runtime.
C.Compilation fails because of an error in line 20.
D.Compilation fails because of an error in line 21.
E.Compilation fails because of an error in line 23.
F.Compilation fails because of an error in line 25.
