Title: Key Concept - Nested Class
Course: CPS 189: Java Certification - Review, Practice & Prepare (Development) > Section: Learning Modules

A nested class

- It is one class defined within another class, called the enclosing class.
- It is a member of the enclosing class.

Nested Classes

- Although an enclosing class may only be declared public or package-private, a nested class can be declared private, public, protected, or package-private.
- There are two types of nested classes:
  - static – class does not have access to other members of the enclosing class.
  - non-static or inner – class has access to other members of the enclosing class.

For additional study, view resources under:

- Level 1 Study Materials: Unit 5