单项选择题
Given:
11. public void go(int x) {
Which statement is true?()
A.All of the assert statements are used appropriately.
B.Only the assert statement on line 12 is used appropriately.
C.Only the assert statement on line 15 is used appropriately.
D.Only the assert statement on line 18 is used appropriately.
E.Only the assert statements on lines 12 and 15 are used appropriately.
F.Only the assert statements on lines 12 and 18 are used appropriately.
G.Only the assert statements on lines 15 and 18 are used appropriately.
相关考题
-
单项选择题
Given: What is the result?()
A.Exception
B.A,B,Exception
C.Compilation fails because of an error in line 20.
D.Compilation fails because of an error in line 14.
E.A NullPointerException is thrown at runtime. -
多项选择题
Which two code fragments are most likely to cause a StackOverflowError?()
A.
B.
C.
D.
E.
F. -
多项选择题
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() { }
G.private void m2() { }
