Q. In Java, can an abstract class have default methods with implementations?

  • (A) No, abstract classes cannot have default methods
  • (B) Only if the methods are marked as "private"
  • (C) Only if the methods are marked as "final"
  • (D) Yes, starting from Java 8, abstract classes can have default methods with implementations
πŸ’¬ Discuss
βœ… Correct Answer: (D) Yes, starting from Java 8, abstract classes can have default methods with implementations

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
132
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Ritu Nagar
Publisher
πŸ“ˆ
82%
Success Rate