Java allows only single inheritance for classes, but a class can implement any number of interfaces. You separate them with commas after implements.
interface Printable {
void print();
}
interface Saveable {
void save(String path);
}
class Report implements Printable, Saveable {
public void print() {
System.out.println("Printing report");
}
public void save(String path) {
System.out.println("Saving to " + path);
}
}
This is how Java works around the single-inheritance limitation. Each interface adds a new type to the class, so a Report object can be passed anywhere a Printable or a Saveable is expected.