Why can't we instantiate an abstract class in Java?

An abstract class is not complete! The author marked it abstract to tell you that some implementation is missing in the code. The author has done some of the work, but you must fill in some bits yourself to get it working. The abstract keyword ensures that no one would accidentally initiate this incomplete class.

Think of repairing a car. Someone has removed the brake pads and is going to replace them in the next day. Now, to prevent someone accidentally driving this car(which has no brakes installed), the mechanic installs a lock on the steering wheel. It's a fail-safe measure.


This is not a technical limitation, rather (as you have pointed out) a logical one. Java (and many other languages) enforce various rules not because they are impossible to break, but because this is an intentional part of the language.


rocketboy shows some mechanistic reasons, but there's a conceptual reason.

An Abstract class represents an abstract concept. Take your vehicle example. You cannot build a vehicle that is not something more specific. You can have a set of vehicles, that could be made of 2004 corolla's and '98 ford escorts and 1984 cs36 (a kind of yacht), a mark 4 firefly class mid-range bulk transport(the one with the stabilizers), you can take any one of those individually and call them a vehicle but you cannot have something that is only a vehicle and not one of those or some other specific type of vehicle.

Abstract classes represent such abstract concepts as vehicle. Hence the idea of instantiating one is non-sensical because to actually instantiate it you need to know what you're instantiating.