Stub class---stub in essay ⑧java

Source: Internet
Author: User

Stub class---Stub in Java

The ① stub class is a class that implements an interface, but every method that is implemented is empty.

Its role is: If an interface has many methods, if you want to implement this interface, it is necessary to implement all the methods. But a class may require only one or two of these methods in terms of business. If you implement this interface directly, all other unrelated methods are implemented, in addition to implementing the required methods. If you implement an interface by inheriting the stub class, you are relieved of the hassle.

Stub class---stub in essay ⑧java

Related Article

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: 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.