Q. What does the 'final' keyword do in a PHP method?

  • (A) Prevents overriding in child classes
  • (B) Forces a method to be static
  • (C) Automatically makes it private
  • (D) Executes the method last
πŸ’¬ Discuss
βœ… Correct Answer: (A) Prevents overriding in child classes
Explanation: The 'final' keyword prevents a method from being overridden in a subclass.
Explanation by: Mr. Dubey
The 'final' keyword prevents a method from being overridden in a subclass.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
108
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
90%
Success Rate