You do not define a constructor in an anonymous class; you call a constructor from a superclass.
You cannot add the correct constructor for the anonymous class, however you can do something like this. Namely, the initialization block.
public class SuperClass { public SuperClass(String parameter) {
source share