Java Basic Concepts (final, abstract, interface)

Source: Internet
Author: User
/* Final keywords in Java are called Final * Final can declare classes, properties, methods * Classes that use Final declaration cannot be inherited * variables with final declaration become constants, constants cannot be modified * methods that use Final declaration cannot be overridden * abstract A class that contains an abstract method is an abstract class that is an abstract method declaration that is not implemented, and the abstract method must declare the abstract class by using the Abstraction keyword, which, if it is not an abstract class, must override all abstract methods in the abstract class * to define the format: * Class C  lassname{* Attribute * Method * Abstract Method *} * Abstract class cannot be instantiated directly, instantiated through its subclasses * Interface special classes, composed of global constants, and public abstract methods * Interface Format * Interface interfacename{* Global Constants * Abstract methods *} * interfaces must be implemented with the Implements keyword subclasses, and interfaces support multiple implementations * */


Java Basic Concepts (final, abstract, interface)

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