[OCAJP]Lambda 用法
Which of the following will create instance of Runnable type? A. Runnable run = () -> {System.out.println("Run");} B. Runnable run = () -> System.out.println("Run"); C. Runnable run = () > System.out...
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
分类
MagicLen 的主要文章,分成「科学与科技」和「社会与生活」两大类。前者以编程、操作系统、网络与软硬件的教学和心得为主,后者包含语言学习、创作、旅游、开箱与各种生活主题,另外还有本站公告。
共 1660 篇文章
Which of the following will create instance of Runnable type? A. Runnable run = () -> {System.out.println("Run");} B. Runnable run = () -> System.out.println("Run"); C. Runnable run = () > System.out...
What is the result? A. A B. B C. Either A or B D. A B E. A compile time error occurs at line n1
What is the result? A. sc: class Object asc: class AnotherSampleClass B. sc: class SampleClass asc: class AnotherSampleClass C. sc: class AnotherSampleClass asc: class SampleClass D. sc: class Anothe...
What is the result? A. Lazy lion is jumping B. Lion is always jumping C. Crazy elephant is jumping D. Elephant is always jumping E. Compilation fails
What is the result? A. p1.Test.class 0.0 B <the summary address refrenced by ref> 0.000000 C. null 0.0 D. Compilation fails E. A NullPointerException is thrown at runtime
What is the result? A. 100 210 B. Compilation fails due to an error in line n1 C. Compilation fails due to an error at line n2 D. Compilation fails due to an error at line n3
Which code fragment, when inserted at line n1, enables the App class to print Equal? A. String str3 = str2; if (str1 == str3) B. if (str1.equalsIgnoreCase(str2)) C. String str3 = str2; if (str1.equal...
What is the result? A. 10 10 B. 8 9 C. 9 8 D. 7 10
Which three are advantages of the Java exception mechanism? A. Improves the program structure because the error handling code is separated from the normal program function B. Provides a set of standa...
What is the result? A. May 04, 2014T00:00:00.000 B. 2014-05-04T00:00:00.000 C. 5/4/14T00:00:00.000 D. An exception is thrown at runtime.