posted 23 years ago
FEI,
Jose's answer is better.
The syntax for instantiating an anonymous class simply does not
allow you to extend a class and implement an interface at the
same time. You either use new < interface > (), which means
you extends class Object, or new < Class > (args), which means you extend the class < Class >.
But, when you declare a class implementing an interface, it is
different. You can specify which class you want to extend, if
Object is not the class you want to extend.
Hope this clarify your doubt.
[This message has been edited by Nain Hwu (edited November 10, 2001).]