• 2022-06-14
    若Animal是Cat,Dog的父类,则下列选项中,正确的是()
    A: Animal animal = new Cat();
    B: Animal a = new Cat(); Cat cat = (Cat) a;
    C: Animal animal = new Dog();
    D: Cat cat = (Cat)new Dog();