Project Combat: JSP Application Development _ Interface: the implementation of the interface

Source: Internet
Author: User

In the declaration of the class using the Implements keyword to implement the interface, a class can implement multiple interfaces at the same time, the interface between the "," separated.

Class ClassName implements interfacename{//overriding the method in the interface;}

(1) If the class that implements the interface is not an abstract class, then all methods of the interface must be implemented, that is, the method body is declared for all abstract methods.

(2) A class must use the exact same method name and argument list when implementing an abstract method of an interface.

(3) The access control for an abstract method of an interface has been specified as public, so the class must explicitly use the public modifier when it is implemented, otherwise it is warned to narrow the access control scope of the method declared in the interface.

Project Combat: JSP Application Development _ Interface: the implementation of the interface

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.