How do I create an object of an abstract class and interface? I know we can\'t instantiate an object of an abstract class directly.
NO, we can't create object out of an interface or Abstract class because
Main intention of creating an object is to utilize the wrapped methods and data. As interface don't have any concrete implementation hence we cannot.
For abstract class we may have concrete method or abstract method or both. There is no way for the API developer to restrict the use of the method thats don't have implementation.
Hope help.