Answer: No, we can not create instance of an abstract class.
Example:
abstract class abstractExample{
public abstract void func1();
}
class derivedClass : abstractExample
{
public override void func1(){
//your code here.....
}
}
if you will try to create instance, it will give error.
abstractExample objAbstract=new abstractExample();//error in this line.
Asked In: Many Interviews |
Alert Moderator