|
Its a contract. Objects declared as an interface guarantee that they will contain the methods contracted by that interface. Since Java does not support multiple extends, interfaces are used to perform multiple inheritance, and because of the lack of multiple extends, interfacing is far more valuable in Java than extends ever will be.
So yes, short version would be that interfaces are used for multiple inheritance as it allows you to interpret a single class as multiple datatypes.
|