Question: public class Manager extends Employeel publie void work) working public class Programmer extends Employeel public void work()( 6. Which of the following declarations will cause
public class Manager extends Employeel publie void work) working public class Programmer extends Employeel public void work()( 6. Which of the following declarations will cause a compile-time error and why, explain? a. Employee employA new Employee0: b. Employee employB new Manager0 c. Employee employC new Manager) d. Employee employD new Employee e. Employee employE new Programmer() 7. Consider the following declarations Employee employ1 new Employee) Manager employ2 new Manager() Employee employ3 new Manager): Which of the following assignments is legal and why, explain? employ1-employ2; employ2 (Manager) employ3 employ! = (Manager) employ2; a. Ionly b. Il only c. IlII only d. 1 and Il only I, II and Ill
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
