I have interface IA, interface IB extends IAand class A implements IA.
Now I want to create an anonymous class that extends from Aand implements IB.
How will it look like? I thought of 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 impossible to create something like an anonymous class?
source
share