πŸ“Š PHP
Q. How can you make a method accessible only within its own class and by inheriting classes?
  • (A) private
  • (B) public
  • (C) protected
  • (D) static
πŸ’¬ Discuss
βœ… Correct Answer: (C) protected

Explanation: Protected methods are accessible within the class and by classes derived from it.

Explanation by: Rati Dubey
Protected methods are accessible within the class and by classes derived from it.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
53
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
82%
Success Rate