What is anonymous class in Java?

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. Anonymous classes usually extend subclasses or implement interfaces.

Sizin İçin Seçtik  What is purpose of inner class in Java?

Leave a Reply

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