the interface in Java is a class that has only global constants and abstract methods , and it is a visionary who knows exactly what to do without knowing what to do. What to do? It's going to hire a doer to get him to finish what he wants.
Interface class: Visionary
Implementation class: Doer
If it's just such a relationship, why not let the doer think about it and finish it? What's the use of visionaries?
This is the answer to the interface role of the problem: to give a chestnut, in many practical development, as a developer generally do not directly to do a product to sell to customers, but first wait for the customer, talk about the specific needs to do the development, the customer can not think of all the needs of developers to do Ah, So developers have developed a number of capabilities within the standard, that is, the disclosure of customer my ability.
Developer-Developed standards: interfaces (customers haven't come yet)
Customer specific needs: implementation class (Customer came)
It can be seen that the use of interfaces is to declare their own capabilities, and within their capabilities to meet the different needs of different customers.
Interfaces in Java and Android