What is an anonymous inner class?

In Java, a class can contain another class known as nested class. It’s possible to create a nested class without giving any name. A nested class that doesn’t have any name is known as an anonymous class. An anonymous class must be defined inside another class. Hence, it is also known as an anonymous inner class.

Sizin İçin Seçtik  What are the types of nested classes?

Leave a Reply

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