Abstract Class is a class that can't be instantiated (objects cannot be created).
It's supposed to represent something abstract and not specific.
Let's look at the following example:
Output:
Explanation
Vehicle
is defined at lines 1-12
.Vehicle
.
This is something indefinite and it's inherited by other classes.line 24
the code won't
compile. That's due to the error set at line 9
.