Interfaces in Java and Android

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.