Consider the following code snippet: public abstract class Employee
{
Public abstract void setSalary() ;
) . .
}
You wish to create a concrete subclass named Programmer. Which of the following is the correct way to declare this subclass?
A) public class Programmer implements Employee
{
Public void setSalary() { . . . }
}
B) public class Programmer extends Employee
{
Void setSalary() { . . . }
}
C) public class Programmer implements Employee
{
Void setSalary() { . . . }
}
D) public class Programmer extends Employee
{
Public void setSalary() { . . . }
}
Correct Answer:
Verified
Q27: Which reserved word must be used to
Q56: To override a superclass method in a
Q57: Consider the following code snippet that appears
Q58: Consider the following code snippet: public class
Q60: Consider the following code snippet: public class
Q63: A class that cannot be instantiated is
Q64: Consider the Counter class below. public class
Q65: Consider the following code snippet: Vehicle aVehicle
Q66: If a class has an abstract method,
Q66: Consider the following code snippet: Employee anEmployee
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents