Can a class have another class inside it?

A class can be declared within the scope of another class . Such a class is called a “nested class.” Nested classes are considered to be within the scope of the enclosing class and are available for use within that scope.

Sizin İçin Seçtik  What are the properties of inner class in Java?

Leave a Reply

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