Multiple choice technology programming languages

Static nested classes do not have access to

  1. Its non-static members

  2. Static members of the enclosing class

  3. Its Static members

  4. Non-Static members of the enclosing class

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Static nested classes cannot access instance (non-static) members of the enclosing class because they are not associated with any instance of the enclosing class. They can only access static members of the enclosing class and their own members (both static and non-static).