我有interface IA和。interface IB extends IAclass A implements IA
A现在我想创建一个匿名类,它从IB.
那会是什么样子?我想过这样的事情:
new A() implements IB { /* ... */ }
( Error: Type mismatch: cannot convert from A to IB )
或者:
new IB() extends A { /* ... */ }
( Error: Syntax error on token(s), misplaced construct(s) )
还是不可能创建类似的东西作为匿名类?