Differences between abstract class and interface:
Abstract class:
1. Abstract class is also like a class but contains abstract methods(A method without body) as well as normal methods.
2. To declare abstract methods in abstract class, we should use abstract keyword.
3. An abstract class can not support multiple inheritance.
4. To implement an abstract class we use extends keyword.
Interface:
1.Interface is also like a class but contains only abstract methods.
2.To declare abstract methods in interface, you need not use abstract keyword.
3. Multiple inheritance is possible with interfaces, we can implement as many interface as we need.
4. To implement an interface we use implements keyword.
Abstract class:
1. Abstract class is also like a class but contains abstract methods(A method without body) as well as normal methods.
2. To declare abstract methods in abstract class, we should use abstract keyword.
3. An abstract class can not support multiple inheritance.
4. To implement an abstract class we use extends keyword.
Interface:
1.Interface is also like a class but contains only abstract methods.
2.To declare abstract methods in interface, you need not use abstract keyword.
3. Multiple inheritance is possible with interfaces, we can implement as many interface as we need.
4. To implement an interface we use implements keyword.