I have two interfaces:
interface A { void foo(); } interface B { void bar(); }
I am able to create anonymous instances of classes impl
For save some keystrokes (for example if the interfaces have a lot of methods) you can use
abstract class Aggregate implements A,B{ } new MyObject extends Aggregate{ void foo(){} void bar(){} }
Notice the key is to declare the Aggregate as abstract