Intermediate PHP
Q83 / 100

What is the purpose of PHP's final keyword on methods?

Correct! Well done.

Incorrect.

The correct answer is B) Prevents child classes from overriding the method

B

Correct Answer

Prevents child classes from overriding the method

Explanation

final public function calculate() in a parent class prevents child classes from overriding it, enforcing the algorithm's behavior.

Progress
83/100