posted 15 years ago
First of all it is wrong syntax to create anonymous class.
This is the right one:
And as you might know, anonymous class can either extend only one class OR implement only one interface. It cannot extend a class and implement an interface together.
Compiler knows this thing and says I know this, I am not gonna allow you, I know anonymous class is implementing Serializable interface, so this anonymous class will never be able to extend class C122, it cannot be a subclass of class C122, so I will not allow this.