Essays in Java Keywords

Source: Internet
Author: User

One: A list of keywords in Java

Two: Super keyword

The Super keyword is used inside a subclass to represent the parent class object .
    • Accessing the properties of the parent class super. Property name
    • Methods to access the parent class super. Method Name ()
    • When a subclass constructor method needs to call the parent class's constructor, the first position in the constructor of the subclass is: Super ()

Three: this keyword

The This keyword represents this class of objects .

This keyword has three main applications:

    • This invokes the attribute in this class, which is the member variable in the class;
    • This invokes the other methods in this class;
    • This calls the other constructor methods in this class, which are placed on the first line of the constructor method when called.

Four: Access control characters

Essays in Java Keywords

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.