During one of my interview, I was asked \"If we can instantiate an abstract class?\"
My reply was \"No. we can\'t\". But, interviewer told me \"Wrong, we can.\"
Extending a class doesn't mean that you are instantiating the class. Actually, in your case you are creating an instance of the subclass.
I am pretty sure that abstract classes do not allow initiating. So, I'd say no: you can't instantiate an abstract class. But, you can extend it / inherit it.
You can't directly instantiate an abstract class. But it doesn't mean that you can't get an instance of class (not actully an instance of original abstract class) indirectly. I mean you can not instantiate the orginial abstract class, but you can:
So you get access to all the methods and properties in an abstract class via the derived class instance.