单项选择题
What is the result?()
A.2 B.3 C.1,2 D.2,3 E.1,2,3
What is the output?()
A.42 B.420 C.462 D.42042
Which two statements are true?()
A.Line 35 will not compile. B.Line 36 will not compile. C.Line 37 will not compile. D.Line 38 will not compile.
public class ClassA { public int getValue() { int value=0; boolean setting = true; String title=”Hello”; (value || (setting && title == “Hello”)) { return 1; } (value == 1 & title.equals(”Hello”)) { return 2; } } } And: ClassA a = new ClassA(); a.getValue(); What is the result?()
A. 1 B. 2 C. Compilation fails. D. The code runs with no output. E. An exception is thrown at runtime.
微信扫一扫,加关注免费搜题