Multiple Choice
Consider the following code snippet: public class Employee
{
) . .
Public void setEmployeeDept(String deptNum)
{
) . .
}
}
Public class Programmer extends Employee
{
) . .
Public void setEmployeeDept(int deptNum)
{
) . .
}
}
Which of the following statements is correct?
A) The Programmer class overrides the setEmployeeDept method.
B) The Employee class overrides the setEmployeeDept method.
C) The Programmer class overloads the setEmployeeDept method.
D) The Employee class overloads the setEmployeeDept method.
Correct Answer:

Verified
Correct Answer:
Verified
Q40: Which of the following statements about classes
Q79: Consider the following inheritance hierarchy diagram: <img
Q80: Suppose the abstract class Message is defined
Q81: Consider the following code snippet: Employee anEmployee
Q82: Consider the hierarchy of classes shown below.
Q83: Consider the classes shown below: public class
Q85: Consider the following code snippet: public void
Q86: If a subclass defines the same method
Q87: Consider the following code snippet:<br>If(anObject instanceof Auto)<br>{<br>Auto
Q88: Consider the hierarchy of classes shown below.