日期:2014-05-20 浏览次数:20767 次
public class Test {
public static void main(String[] args) {
A a = new B();
new C().print(a);
}
}
class A {
}
class B extends A {
}
class C {
public void print(A a) {
System.out.println("a");
}
public void print(B b) {
System.out.println("b");
}
}