LearnFrenzy
Sign in Take a free test

Classes and Objects · Classes and Objects MCQ · Question 20

Helpful NullPointerException messages Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 20 Back to Exercise

Since Java 14, what does a NullPointerException message tell you?

  • A Nothing new
  • B Exactly which reference was null and what the code tried to do with it Correct
  • C The line number only
  • D How to fix the bug automatically
Correct Answer: Option B

For example: Cannot invoke "String.length()" because "name" is null.

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!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links