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 different between them.
Interfaces do a related thing. They let you write code that takes advantage of commonalities.
interface Dog {
void bark();
}