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.
Which of the following will create instance of Runnable type?
A. Runnable run = () -> {System.out.println("Run");}
B. Runnable run = () -> System.outprintlnfRun");
C. Runnable run = () > System.outpr...
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.
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