I have interface IA
, interface IB extends IA
and class A implements IA
.
Now I want to create an anonymous class which extends from A
and implements IB
.
How would that look like? I thought about something like this:
new A() implements IB { /* ... */ }
( Error: Type mismatch: cannot convert from A to IB )
or:
new IB() extends A { /* ... */ }
( Error: Syntax error on token(s), misplaced construct(s) )
Or is it not possible to create something like that as an anonymous class?