Expedia Interview Question
Software Engineer / DevelopersNo, there are a few differences between an interface and an abstract class.
1. In an interface all the methods should be abstract but in an abstract class it is not necessary to have abstract methods.
2. Any class can implement an interface but to extend the methods of an abstract class, it should be a subclass of that class.
3. By default all the methods in an interface are public
An abstract class may have data members.
- kulang November 30, 2008