ALL LESSONS Module 13

Java Interfaces Complete Guide

Apr 5, 2026 1 min read

Interfaces

100% abstract contracts defining method signatures.

Interface Implementation

interface Drawable {
    void draw();
    
    default void resize() { // Java 8+
        System.out.println("Resizing");
    }
}

class Rectangle implements Drawable {
    public void draw() {
        System.out.println("Drawing rectangle");
    }
}

Key Points

  • implements keyword for classes.
  • Multiple inheritance: class C extends A implements B, C.
  • Default/static methods since Java 8.
  • All methods public abstract by default.

Need help with this lesson? Visit the Discussion Forum