[OCAJP] 相同签名的方法
What is the result? A. One B. Two C. Three D. Compilation fails.
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
分类
认证考试的考古题与模拟题解析,包含 Linux 认证(LPIC-1、LPIC-2)与 Java 认证(OCAJP、OCPJP),每一题都附上答案与详细的解说。
共 888 篇文章
What is the result? A. One B. Two C. Three D. Compilation fails.
What is the result? A. simaple A B. Capital A C. simaple A default Capital A D. simaple A default E. Compilation fails.
Which three lines, when inserted independently at line n1, cause the program to print a 0 balance? A. this.amount = 0; B. amount = 0; C. acct(0); D. acct.amount = 0; E. acct.getAmount() = 0; F. acct....
Which code fragment, when inserted at line //insert code here, enables the code to print COJ?
What is the result? A. 2 4 B. 0 2 4 6 C. 0 2 4 D. Compilation fails
What is the result? A. null B. Compilation fails C. An exception is thrown at runtime D. 0
What is the result? A. Caught java.lang.RuntimeException: Exception Exception in thread "main" java.lang.Error: Error at TestApp.doList(TestApp.java: 14) at TestApp.main(TestApp.java: 6) B. E...
Which of the following will print current time? A. System.out.print(new LocalTime().now()); B. System.out.print(new LocalTime()); C. System.out.print(LocalTime.now()); D. System.out.print(LocalTime.t...
What is the result? A. Success B. Failure C. Compilation fails. D. An exception is thrown at runtime
What is the result? A. 0 unknown 0 unknown B. 1200 Strawberry 1200 Strawberry C. 1200 Strawberry 1230 Chocolate D. Compilation fails