I have an abstract class which name is abclass
,
why i cant create an object like
abclass ab1 = new abclass();
from main
I have constructor in abclass
also.
I have an abstract class which name is abclass
,
why i cant create an object like
abclass ab1 = new abclass();
from main
I have constructor in abclass
also.
You cannot create an instance of an abstract class
.
If you don't provide an implementation for some methods on your abstract class
, it cannot, obviously, work.
I suggest you Google 'abstract classes' for more information.
If you want to instantiate your class
, remove the abstract
keyword.
Read about "Abstract Classes"
in MSDN
It is beautifully explained !!!!
The reason is: Abstract class can not be instantiated .
Lets do some basics here: