What is the criteria to create abstract class and interface?
Rajanikant Hawaldar
Select an image from your device to upload
An abstract class must have at least one abstract method. An abstract class includes final methods. An abstract class may also include non-abstract methods. An abstract class can consist of constructors and static methods.In INTERFACE If you are creating functionality that will be useful across a wide range of objects, then you must use an interface. Abstract classes, at the end of the day, should be used for objects that are closely related. But the interfaces are best suited for providing common functionality to unrelated cases
Abstact class gives you functioality that can be implemnted or override in sub classes, whereras interface allows you to define not implement the functionality, so ween ever you want to extend the functionality of base class you can use abstract class, as it only allow inheritance.