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!