LearnFrenzy
Sign in Take a free test

Classes and Objects · Classes and Objects MCQ · Question 16

Static nested classes Answer, explanation & discussion

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

Which statement about a static nested class is true?

  • A It needs an outer object to be created
  • B It can be created without an outer object and cannot use the outer class's instance fields directly Correct
  • C It cannot have methods
  • D It must be private
Correct Answer: Option B

It behaves like a top-level class placed inside another for organisation.

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