If you’re studying interfaces in Java, you most likely already know a thing or two about classes. In fact, you’re probably wondering what the difference between an interface and a class even is, and why you would choose to use an interface instead of a class.
In super simplified terms, an interface is a collection of methods that a class must inherit. The easiest way to think about this is imagining that the class has signed a contract, promising to perform each behavior dictated by the interface. [Read more...]