What is a static method in an Interface, and how is it different from a default method in an interface?

Both static methods and default methods were introduced in interfaces to enhance functionality without breaking existing implementations. However, they serve different purposes. A static method belongs to the interface itself, while a default method provides a reusable implementation that can be inherited and overridden by implementing classes.

Key Points

Example

Consider a Payment interface. A static method can validate payment details, while a default method can provide a common payment status message.

interface Payment {

    static boolean isValidAmount(double amount) {
        return amount > 0;
    }

    default void showStatus() {
        System.out.println("Payment Processed");
    }
}

class UpiPayment implements Payment {

    @Override
    public void showStatus() {
        System.out.println("UPI Payment Processed");
    }
}

public class Demo {

    public static void main(String[] args) {

        System.out.println(
                Payment.isValidAmount(1000)
        );

        UpiPayment payment = new UpiPayment();

        payment.showStatus();
    }
}

Output

true

UPI Payment Processed

Comparison

Static Method

Default Method

Common Use Cases

Static Method

Default Method

Interview Tip

A concise interview answer is

A static method in an interface belongs to the interface itself and is called using the interface name. It cannot be overridden. A default method provides a concrete implementation that implementing classes inherit and may override if needed. Static methods are used for utility functions, while default methods provide shared behavior.

Last updated: 16 July 2026

Previous question: Explain the difference between Comparable and Comparator interfaces. When would you use one over the other?

Next question: What is the diamond problem in Java and how does Java address it?

More Core Java - Level II interview questions

All Core Java - Level II questions