What is a nested class?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is a nested class?
Rating:
A class defined within the body of another class is known as a nested class, and the class that encloses it is known as its enclosing class. The scope of a nested class is bounded by the scope of its enclosing class. A nested class has unlimited access to the members of its enclosing class, even if they are declared as private. However, the enclosing class does not have access to the members of the nested class. When a nested class is declared as static, it is called a static nested class. Otherwise, it is called an inner class.
Rating:
Was this information helpful?
Other articles
- What is the Comparable interface?
- What is the Number class?
- Skills required for Sun test CX310-056
- What is array initializer?
- What is the bitwise right shift operator?