Java多态或动态 Java协变返回类型 Java匿名对象 Java多态或动态 class SuperClass { SuperClass get(){ System.out.println("SuperClass"); return this; } } public class Tester extends SuperClass { Tester get(){ System.out.println("SubClass"); return this; } public static void main(String[] args) { SuperClass tester = new Tester(); tester.get(); } } Java协变返回类型 Java匿名对象