What is nested and inner class in Java with example?

Non-static nested classes are called inner classes . Nested classes that are declared static are called static nested classes. A nested class is a member of its enclosing class. Non-static nested classes (inner classes) have access to other members of the enclosing class, even if they are declared private.

Sizin İçin Seçtik  How many predefined methods are there in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *