Using parameter that implements multiple interfaces pre-generics
问题 Suppose I have these interfaces: public interface I1 { void foo(); } public interface I2 { void bar(); } and the classes: public class A extends AParent implements I1, I2 { // code for foo and bar methods here } public class B extends BParent implements I1, I2 { // code for foo and bar methods here } public class C extends CParent implements I1 { // code for foo method here } Now, with generics I can have a method like: public <T extends I1 & I2> void method(T param) { param.foo(); param.bar(