Default methods are methods in an interface that provide a body using the default keyword, allowing implementing classes to inherit a working implementation instead of being forced to override it.
The Comparator interface added a default method reversed() in Java 8, so any existing Comparator implementation automatically gained that capability without needing to be rewritten.
interface Vehicle {
void drive();
default void honk() {
System.out.println("Beep beep!");
}
}
class Car implements Vehicle {
public void drive() {
System.out.println("Driving...");
}
}
// new Car().honk(); prints "Beep beep!" without Car defining itA concise interview answer is
Default methods let an interface provide a method body using the default keyword, so implementing classes get it for free. They were introduced so the JDK could add new methods to interfaces like Collection and Comparator without breaking every class that already implemented them — that's what made Streams possible to bolt onto the existing Collections Framework.
Last updated: 11 November 2026
Previous question: How can you filter a collection using Streams in Java 8?
Next question: How are static methods in interfaces different from default methods in Java 8?