class Dog { } class Harrier extends Dog { } class DogTest { public static void main(String [] args) { Dog d1 = new Dog(); Harrier h1 = new Harrier(); Dog d2 = h1; Harrier h2 = (Harrier) d2; Harrier h3 = d2; } } 下面哪一项是正确的?()
- A编译失败
- B2个Dog对象被创建
- C2个Harrier对象被创建
- D3个Harrier对象被创建