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

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

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
192
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Pooja
Publisher
πŸ“ˆ
83%
Success Rate