Vidyalelo
Java Programming · Q30

Interfaces and Abstract Classes

Programming · Java Programming · question 30

Q30

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
Answer

Answer: Option D

Solution

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