Interview Preparation mode beta
Funny Facebook Status Funny Facebook Status
Enter your email address

Can you use abstract classes instead of interfaces?

Nice?Vote!
You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?
asked 1 year ago in Java Interview Questions and Answers by anonymous

1 Answer

Nice?Vote!
Sometimes. But your class may be a descendant of another class and in this case the interface is your only option.
answered 1 year ago by anonymous

Related questions