interface A {
void aMethod();
}
interface B {
void bMethod();
}
interface C {
void cMethod();
}
class ClassA {
public void aMethod() {
}
}
class D extends ClassA implements A, B, C {
public void bMethod() {
}
public void cMethod() {
}
}
public class MainClass {
public static void t(A x) {
x.aMethod();
}
public static void u(B x) {
x.bMethod();
}
public static void v(C x) {
x.cMethod();
}
public static void w(ClassA x) {
x.aMethod();
}
public static void main(String[] args) {
D h = new D();
t(h);
u(h);
v(h);
w(h);
}
}
|