An abstract class is a partially implemented class that serves as a blueprint for its subclasses. It cannot be instantiated directly and is used when multiple related classes share common behavior while requiring their own specific implementations.
Consider a Vehicle abstract class with a start() method implemented and a fuelType() method declared as abstract. Different vehicle types such as Car and Bike can provide their own implementation of fuelType().
abstract class Vehicle {
abstract void fuelType();
void start() {
System.out.println("Vehicle Started");
}
}
class Car extends Vehicle {
@Override
void fuelType() {
System.out.println("Petrol");
}
}
public class Main {
public static void main(String[] args) {
Vehicle vehicle = new Car();
vehicle.start();
vehicle.fuelType();
}
}A concise interview answer is
An abstract class is a class that cannot be instantiated and may contain both abstract and concrete methods. It is used to provide common functionality while forcing subclasses to implement specific behaviors.
Last updated: 11 November 2026
Previous question: What is an interface in Java?
Next question: What is a package in Java?