What is inner class and outer class in Java?

Nested Classes In Java, just like methods, variables of a class too can have another class as its member. Writing a class within another is allowed in Java. The class written within is called the nested class, and the class that holds the inner class is called the outer class .

Sizin İçin Seçtik  Which class is base class in Java?

Leave a Reply

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

What is inner class and outer class in Java?

Nested Classes In Java, just like methods, variables of a class too can have another class as its member. Writing a class within another is allowed in Java. The class written within is called the nested class, and the class that holds the inner class is called the outer class .

Sizin İçin Seçtik  Can a class have another class inside it?

Leave a Reply

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