Can we declare local inner class as private?

Unlike a class, an inner class can be private and once you declare an inner class private, it cannot be accessed from an object outside the class.

Sizin İçin Seçtik  Can you create an object of a class within the same class in Java?

Leave a Reply

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