Question 4
Back to Exercise
What does new String[2] contain?
- A "", ""
- B null, null Correct
- C "null", "null"
- D It does not compile
Correct Answer: Option B
Reference elements default to null; calling a method on them throws NullPointerException.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!