[OCAJP][OCPJP] 当 foreach 遇到 null
What is the result? A. null B. Compilation fails C. An exception is thrown at runtime D. 0
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
分类
MagicLen 的主要文章,分成「科学与科技」和「社会与生活」两大类。前者以编程、操作系统、网络与软硬件的教学和心得为主,后者包含语言学习、创作、旅游、开箱与各种生活主题,另外还有本站公告。
共 1660 篇文章
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
What is the result? A. i:16 j:33 B. i:15 j:33 C. i:33 j:23 D. i:15 j:23
Which two actions will improve the encapsulation of a class? A. Changing the access modifier of a field from public to private B. Removing the public modifier from a class declaration C. Changing the...
What is the result? A. 1.0, 1 B. 1.0f, 1 C. 7.33, 7 D. Compilation fails E. An exception is thrown at runtime
What is the result? A. true, false B. false, true C. true, true D. false, false
What is the result? A. 8 B. 9 C. 11 D. 10 E. Compilation fails