What are nested and inner classes in Java?

A non-static nested class is a class within another class . It has access to members of the enclosing class (outer class). It is commonly known as inner class . Since the inner class exists within the outer class, you must instantiate the outer class first, in order to instantiate the inner class.

Sizin İçin Seçtik  What is abstract class function?

Leave a Reply

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