Can an anonymous inner class have a constructor Why?

A constructor should have the name same as the class. Since anonymous inner class has no name, an anonymous inner class cannot have an explicit constructor in Java .

Sizin İçin Seçtik  What are types of inner class in Java?

Leave a Reply

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