class Boat extends Vehicle
{
void turn(int angle) { ... }
}
An abstract class is one not intended for direct creation; creation is only implied as a general case of a more specific class.
Vehicle v;
v = new Vehicle(); wrong Vehicle is abstract
v = new Automobile(); ok
v = new Boat(); okVehicle.java complete sample code.
Examples ObjectDraw.java (Run this applet.)