Can you write a class in a class?

You just need to write a class within a class . 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. Following is the program to create an inner class and access it.

Sizin İçin Seçtik  Which of the following is a correct way to create an object of class test?

Leave a Reply

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