已知类的继承关系如下: classEmployee; classManagerextendsEmployee; classDirectorextendsEmployee; 下语句能通过编译的有哪些?
A: Employeee=newManager();
B: Directord=newManager();
C: Directord=newEmployee();
D: Managerm=newDirector();
A: Employeee=newManager();
B: Directord=newManager();
C: Directord=newEmployee();
D: Managerm=newDirector();
举一反三
- 已知类的继承关系如下: classEmployee; classManagerextendsEmployeer; classDirectorextendsEmployee; 下语句能通过编译的有哪些? A: Employeee=newManager(); B: Directord=newManager(); C: Directord=newEmployee(); D: Managerm=newDirector();
- 已知类的继承关系如下: A: assEmployee; B: assManagerextendsEmployeer; C: assDirectorextendsEmployee; D: 下语句能通过编译的有哪些? E: Employeee=newManager(); F: Directord=newManager(); G: Directord=newEmployee(); H: Managerm=newDirector();
- 已知类的继承关系如下: classEmployee; classManagerextendsEmployeer; classDirectorextendsEmployee; 则以下语句能通过编译的有哪些?
- 已知类的继承关系如下:classEmployee;classManage...yee;则以下语句能通过编译的有哪些?
- 已知类关系如下:ClassEmployee{}ClassManagerextendsEmployee{}ClassDirectorextendsEmployee{}则下列语句正确的是:()。 A: Employee e=new Manager(); B: Director d=new Manager(); C: Director d =new Employee (); D: Manager m=new Director ();