Interfaces

Generics let you write code that doesn't care what is different between different things - you would accept a String or an Integer, doesn't matter what is diferent between them.

Interfaces do a related thing. They let you write code that takes advantage of commonalities.

inteface Dog {
    void bark();
}