forked from JavaTX/JavaCompilerCore
38 lines
367 B
Java
Executable File
38 lines
367 B
Java
Executable File
|
|
/*
|
|
|
|
A <i>I
|
|
B C D
|
|
E F
|
|
|
|
*/
|
|
interface I{
|
|
void fooA();
|
|
}
|
|
class A{
|
|
void fooA() {}
|
|
}
|
|
class B extends A{}
|
|
|
|
class C extends A implements I{}
|
|
|
|
class D implements I{
|
|
fooD() {}
|
|
}
|
|
class E extends B {}
|
|
|
|
class F extends C{}
|
|
|
|
public class TestInheritanceTwoHierarchies {
|
|
|
|
public m1(x) {
|
|
x.fooA();
|
|
return x;
|
|
}
|
|
|
|
public m2(x) {
|
|
x.fooD();
|
|
return x;
|
|
}
|
|
}
|