Given:
and
What is the result?
A. A NullPointerException is thrown at run time.
B. The compilation fails.
C. 1 Null null
D. 1
1
1
E. A ClassCastException is thrown at run time.
Given:
and
What is the result?
A. A NullPointerException is thrown at run time.
B. The compilation fails.
C. 1 Null null
D. 1
1
1
E. A ClassCastException is thrown at run time.
Answer is B.
there is a round bracket in the words declaration instead of curly braces. That will generate compilation error.
D