标签: java class oop object reference
class Parent { public void methodOfParent() {} } class Child { public void methodOfChild() {} } public class Tester { public static void main(String[] args) { **Parent x=new Child ();** } }
为父类提供对子类对象的引用有什么用?