Vidyalelo
PHP · Q16

Exceptions And Error Handling

Programming · PHP · question 16

Q16

You can extend the exception base class, but you cannot override any of the preceding methods because the are declared as__________

A.
protected
B.
final
Answer
C.
static
D.
private

Answer: Option B

Solution

Answer: Option B
Solution:
Marking a method as final prevents it from being overridden by a subclass.