What is 'instantiationerror in java'?

Example:

abstract class AbstractClass {}

AbstractClass obj = new AbstractClass();
Solution:

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