[OCAJP] 变量的范围
Which is true? A. Sum for 0 to 0 = 55 B. Sum for 0 to 10 = 55 C. Compilation fails due to error on line 6. D. Compilation fails due to error on line 7. E. An Exception is thrown at the runtime.
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
分类
Java 编程语言的教学与范例,包含语法观念、算法实作与桌面程序开发,并收录大量 Java 认证考试(OCAJP、OCPJP)的题目解析。
共 403 篇文章
Which is true? A. Sum for 0 to 0 = 55 B. Sum for 0 to 10 = 55 C. Compilation fails due to error on line 6. D. Compilation fails due to error on line 7. E. An Exception is thrown at the runtime.
Which two definitions of class C are valid? A. class C extends A implements X { } B. class C implements Y extends B { } C. class C extends A, B { } D. class C implements X, Y extends B { } E. class C...
Given the definitions of the MyString class and the Test class: What is the result?
What is the result? A. 5 + 2 = 34 5 + 2 = 34 B. 5 + 2 + 3 + 4 5 + 2 = 7 C. 7 = 7 7 + 7 D. 5 + 2 = 34 5 + 2 = 7
What is the result? A. 10 20 30 40 B. 0 0 30 40 C. Compilation fails D. An exception is thrown at runtime
Which two code fragments are valid?
What is the result? A. 200.0 : 100.0 B. 400.0 : 200.0 C. 400.0 : 100.0 D. Compilation fails.
What is the result? A. Execution terminates in the first catch statement, and caught a RuntimeException is printed to the console. B. Execution terminates In the second catch statement, and caught an...
What is the result? A. 10:20 B. 0:20 C. Compilation fails at line n1 D. Compilation fails at line n2
What are the values of each element in intArr after this code has executed? A. 15, 60, 45, 90, 75 B. 15, 90, 45, 90, 75 C. 15, 30, 75, 60, 90 D. 15, 30, 90, 60, 90 E. 15, 4, 45, 60, 90