Vidyalelo
Java Programming · Q26

Interfaces and Abstract Classes

Programming · Java Programming · question 26

Q26

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
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board