[OCPJP]TreeMap 和 Comparator 的用法
What is the result? A. A compilation error occurs. B. d b e z j C. j z e b d D. z b d e j
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
分类
认证考试的考古题与模拟题解析,包含 Linux 认证(LPIC-1、LPIC-2)与 Java 认证(OCAJP、OCPJP),每一题都附上答案与详细的解说。
共 888 篇文章
What is the result? A. A compilation error occurs. B. d b e z j C. j z e b d D. z b d e j
You have been asked to ensure that the run methods of both the Worker and Master classes are executed. Which modification meets the requirement? A. At line n2, insert CyclicBarrier cb = new CyclicBa...
What is the result? A. [Java EE: Helen:Houston] [Java ME: Jessy:Chicago, Java ME: Mark:Chicago] B. Java EE Java ME C. [Java ME: Jessy:Chicago, Java ME: Mark:Chicago] [Java EE: Helen:Houston] D. A com...
A. static void fly (Consumer<Bird> bird) { bird::fly(); } B. static void fly (Consumer<? extends Bird> bird) { bird.accept().fly(); } C. static void fly (Supplier<Bird> bird) { bird.get()....
Which two modifications enable the code to compile? A. At line 1, remove abstract B. At line 9, insert super ( ); C. At line 12, remove public D. At line 17, insert super(x); E. At line 17, insert su...
What is the result? A. A compilation error occurs at line n3. B. A compilation error occurs at line n1. C. A compilation error occurs at line n2. D. The code prints the content of the employee.txt fi...
Which statement is true about the single abstract method of the java.util.function.Function interface? A. It accepts one argument and returns void. B. It accepts one argument and returns boolean. C. ...
Which modification enables the code to print Try again? A. Comment the lines 28, 29 and 30. B. Replace line 26 with: } catch (Exception | ArithmeticException | NumberFormatException e) { C. Replace l...
Which two class definitions compile?
What is the result? A. Travel time is 4 hours B. Travel time is 6 hours C. Travel time is 8 hours D. An exception is thrown at line n1.