Q. In Java, can a subclass override a protected method from its superclass?

  • (A) Yes, regardless of the package
  • (B) No, protected methods cannot be overridden
  • (C) No, protected methods are private
  • (D) Yes, as long as it's in the same package
πŸ’¬ Discuss
βœ… Correct Answer: (D) Yes, as long as it's in the same package

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
148
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Sandhya Thakur
Publisher
πŸ“ˆ
80%
Success Rate