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.
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.