Can we define a constructor in anonymous class Java?

You can’t declare a constructor for an anonymous class , because the name for a constructor must be the same as the name of the class. And since the class in question has no name, you can’t declare a constructor for the class.13 Şub 2012

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

Leave a Reply

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