interface A { void a(); } interface B { void b(); } class C implements A, B { public void a(){System.out.println("a");} public void b(){System.out.println("b");} } class Mixed { public static void foo(T arg) { arg.a(); arg.b(); } public static void main( String ... args ) { Mixed.foo( new C() ); } }