Asked by Shalini Kashyap on Sep 26, 2024

verifed

Verified

If the final modifier is added to the definition of a method,this means:

A) The method may be redefined in the derived class.
B) The method may be redefined in the sub class.
C) The method may not be redefined in the derived class.
D) None of the above.

Final Modifier

A keyword in Java indicating that a variable cannot be reassigned, a method cannot be overridden, or a class cannot be inherited.

Derived Class

In OOP, it is a class that extends another class, inheriting its methods and properties, allowing for polymorphism and code reuse.

  • Understand method overriding and the restrictions imposed by the final modifier.
verifed

Verified Answer

MW
Melissa Wormleaton2 days ago
Final Answer :
C
Explanation :
If the final modifier is added to the definition of a method, it means that the method may not be redefined in the derived class. Therefore, option C is the correct answer.