Techiee Techiee - 1 year ago 83
Java Question

Can we instantiate an abstract class? Is it possible?

I read in SCJP6 that an abstract class cannot be instantiated. But read somewhere that they can be instantiated. Is is true? I am new to Java and would like if anyone could explain this in detail. An example would also be a good.

Answer Source

You can create a reference of an abstract class, but cant instantiate it. For eg.

public abstract class AbstractClass {

    public abstract void abstractMethod();
    public  void concreteMethod(){
        System.out.println("am in concreteMethod");


public class ExtndClass extends AbstractClass{

    public void abstractMethod() {
        // TODO Auto-generated method stub
        System.out.println(" am in extended class");
    public static void main(String...arg){
        AbstractClass abs = new ExtndClass();




am in extended class
am in concreteMethod
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download