What is 'instantiationerror in java'?


abstract class AbstractClass {}

AbstractClass obj = new AbstractClass();

This error arises when you try to instantiate an abstract class or an interface directly. Provide a concrete subclass or implementation and instantiate that.

abstract class AbstractClass {}

class ConcreteClass extends AbstractClass {}

ConcreteClass obj = new ConcreteClass();

Beginner's Guide to Java