[OCAJP] 方法的实作
Which method can be inserted at line // insert code here to enable the code to compile? A. public int[] subArray(int[] src, int start, int end) { return src; } B. public int subArray(int src, in...
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
分类
认证考试的考古题与模拟题解析,包含 Linux 认证(LPIC-1、LPIC-2)与 Java 认证(OCAJP、OCPJP),每一题都附上答案与详细的解说。
共 888 篇文章
Which method can be inserted at line // insert code here to enable the code to compile? A. public int[] subArray(int[] src, int start, int end) { return src; } B. public int subArray(int src, in...
What is the result? A. Good Day! Good Luck! B. Good Day! Good Day! C. Good Luck! Good Day! D. Good Luck! Good Luck! E. Compilation fails
Which constructor initializes the variable x3? A. Only the default constructor of class X B. Only the no-argument constructor of class Y C. Only the no-argument constructor of class Z D. Only the def...
What is the result? A. 100 B. 101 C. 102 D. 103 E. Compilation fails
Which of the following can fill in the blank in this code to make it compile? A. abstract B. final C. private D. default E. int
Which set of changes enable the code to print 1, true? A. Replacing <code1> with index > 0 and replacing <code2> with index--; B. Replacing <code1> with index > 0 and replacing <code2> with --index; ...
Which two code fragments, when inserted independently at line // Insert code here, enable the program to execute and print the welcome message on the screen? A. static public void main (String [] arg...
What is the result? A. 100 200 : 100 200 : B. 100 0 : 100 0 : C. 100 200 : 100 0 : D. 100 0 : 100 200 :
What is the result? A. A B C D B. A C D C. A B C D. A B D E. A B D C F. A B C C
Which three code fragments can be independently inserted at line nl to enable the code to print one?