Can inner class be protected in Java?

Java inner class is defined inside the body of another class. Java inner class can be declared private, public, protected, or with default access whereas an outer class can have only public or default access.

Sizin İçin Seçtik  How do you instantiate an inner class in Java?

Leave a Reply

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