MCQ Single Best Answer Not Set

QYou can extend the exception base class, but you cannot override any of the preceding methods because they are declared as.

ID: #2455 Exception Handling in PHP 712 views
Question Info
#2455Q ID
Not SetDifficulty
Exception Handling in PHPTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A protected
  • B final
  • C static
  • D private
Correct Answer: Option B

Explanation

Marking a method as final prevents it from being overridden by a subclass.

Share This Question

Challenge a friend or share with your study group.