Given the code fragment: What is the result?
A.
A NullPointerException is thrown at runtime.
B.
Null Null
C.
Element 0 Element 1
D.
Null element 0 Null element 1
Explanation:
Given the code fragment: What is the result?
A.
A NullPointerException is thrown at runtime.
B.
Null Null
C.
Element 0 Element 1
D.
Null element 0 Null element 1
Explanation:
a
A.
A NullPointerException is thrown at runtime.
Definitely A.
Answer: A
output:
Exception in thread “main” java.lang.NullPointerException
a
A
null cant’t call the method “concat”