[OCAJP][OCPJP] 例外处理 2
What is the result? A. 0 Done B. First Exception Done C. Second Exception D. Done Third Exception E. Third Exception
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
分类
认证考试的考古题与模拟题解析,包含 Linux 认证(LPIC-1、LPIC-2)与 Java 认证(OCAJP、OCPJP),每一题都附上答案与详细的解说。
共 888 篇文章
What is the result? A. 0 Done B. First Exception Done C. Second Exception D. Done Third Exception E. Third Exception
Which code fragments, inserted independently, enable the code compile? A. t.fvar = 200; B. cvar = 400; C. fvar = 200; cvar = 400; D. this.fvar = 200; this.cvar = 400; E. t.fvar = 200; Test2.cvar = 40...
Which two items are fields? A. j B. k C. x D. y E. z
What is the result? A. Reading Card Checking Card B. Compilation fails only at line n1. C. Compilation fails only at line n2. D. Compilation fails only at line n3. E. Compilation fails at both line n2...
What is the result? A. 97 98 99 100 null null null B. 91 98 99 100 101 102 103 C. Compilation fails. D. A NullPointerException is thrown at runtime. E. An ArraylndexOutOfBoundsException is thrown at ...
Which line causes a compilation error? A. Line n1 B. Line n2 C. Line n3 D. Line n4
Which code fragment prints Hello world? A. sb.insert(0,"Hello "); System.out.println(sb); B. sb.append(0,"Hello "); System.out.println(sb); C. sb.add(0,"Hello "); System.out.println(sb); D. sb.set(0,...
Which set modifications enable the code to compile and run?
What is the result? A. [green, red, yellow, cyan] B. [green, blue, yellow, cyan] C. [green, red, cyan, yellow] D. Am IndexOutOfBoundsException is thrown at runtime
Which modification enables the code fragment to print TrueDone? A. Replace line 5 With String opt = "true"; Replace line 7 with case "true": B. Replace line 5 with boolean opt = 1; Replace line 7 wit...