Multiple Choice
Consider the following code snippet:
Public class Employee
{
) . .
Public void setDepartment(String deptName)
{
) . .
}
}
Public class Programmer extends Employee
{
) . .
Public void setProjectName(String projName)
{
) . .
}
Public void setDepartment(String deptName)
{
) . .
}
}
Which of the following statements is NOT correct?
A) The Programmer class can call the setDepartment method of the Employee class.
B) The Employee class can call the setProjectName method.
C) The Programmer class overrides the setDepartment method.
D) The Programmer class can call the setDepartment method of the Programmer class.
Correct Answer:

Verified
Correct Answer:
Verified
Q24: To override a superclass method in a
Q56: Consider the following code snippet:<br>Public class Motorcycle
Q58: Consider the following code snippet of a
Q60: Consider the following code snippet:<br>Public abstract class
Q63: Consider the following code snippet that appears
Q64: If a class has an abstract method,
Q65: Consider the following code snippet:<br>Public class Vehicle<br>{<br>)
Q66: Which of the following can potentially be
Q82: Which of the following indicates that a
Q91: Which of the following statements about superclasses