[OCAJP] 错误的数组长度
Which of the following exception will be thrown due to the statement given here? int array[] = new int[-2]; A. NullPointerException B. NegativeArraySizeException C. ArrayIndexOutOfBoundsException D....
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
标签
Oracle Certified Associate Java SE Programmer (OCAJP).
共 230 篇文章
Which of the following exception will be thrown due to the statement given here? int array[] = new int[-2]; A. NullPointerException B. NegativeArraySizeException C. ArrayIndexOutOfBoundsException D....
Which statement is true? A. Both p and s are accessible by obj. B. Only s is accessible by obj. C. Both r and s are accessible by obj. D. p, r, and s are accessible by obj.
What is the result? A. 5 : 5 B. 6 : 4 C. 6 : 5 D. 5 : 4
What is the result? A. log3:false log4:true B. log3:true log4:true C. log3:true log4:false D. log3:false log4:false
Which line of codes prints the highest number? A. Line 21 B. Line 22 C. Line 23 D. Line 24 E. Line 25
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