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.
But let me answer the question which might have led to this question: how do I initialize the state of an object which is an instance of an anonymous class? And the answer is to use an instance initializer. Like this: