Question: Consider the following code snippet: public class Employee { public void setDepartment ( String deptName ) { } } public class Programmer extends Employee {
Consider the following code snippet:
public class Employee
public void setDepartmentString deptName
public class Programmer extends Employee
public void setProjectNameString projName
public void setDepartmentString deptName
Which of the following statements is correct?
The Employee class's
method overrides the
class's
method.
An object of type Employee can call the
method on itself.
An object of type
can call the
method of the Programmer class on
itself.
An object of type
can call the
method of the Employee class on
itself.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
