Java Internal classes

Source: Internet
Author: User

Inner Class (inner Class): A class defined inside a class is called an inner class or built-in class.

1, the inner class is controlled by the external class to control the visibility of the inner class;

2. Through this reference, the inner class object can freely access all members of the outer class.

3. The class containing the inner class becomes the outer Class (outer Class).

4, the external class can only be public and the default access level, and the member class can be in Public,protected,privarte and the default of these four access levels.

Anonymous Class is a special class that does not have a name.

Test Class (Customer Class): outer the Access class and its inner class

Instance Inner class

One of the members inner classes, with no static adornments

    

Java Internal classes

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.