Multiple Choice
Consider the following code snippet: Employee anEmployee = new Programmer() ;
AnEmployee.increaseSalary(2500) ;
If the Programmer class inherits from the Employee class, and both classes have an implementation of the increaseSalary method with the same set of parameters and the same return type, which statement is correct?
A) The increaseSalary method of the Programmer class will be executed.
B) The increaseSalary method of the Employee class will be executed.
C) You must specify in the code which class's increaseSalary method is to be used.
D) It is not possible to determine which class's method is called.
Correct Answer:

Verified
Correct Answer:
Verified
Q28: You are creating a class inheritance hierarchy
Q62: If a subclass contains a method with
Q64: If a subclass uses the same method
Q65: Consider the following code snippet:<br>Int numAxles =
Q66: Consider the hierarchy of classes shown below.
Q68: Consider the classes shown below: public class
Q69: Consider the classes shown below: public class
Q71: You are creating a Motorcycle class which
Q72: Consider the following class hierarchy: public class
Q91: Which of the following statements about superclasses