Java Internal classes

Source: Internet
Author: User

1. Inner class

2. The name of the inner class does not exist alone and exists according to the existence of the external class name. The name of the inner class can be the same as the name of the other class outside.

3. This this.num prints the num in the inner class.

4. Accessing the External class member variable method in the inner class

5. The internal class generates the file that is the outer class $ inner class. Class

6. There is a place where this can not appear static

7. If the outer class is not a new inner class, the inner class is not in memory. Class is when it is used to enter memory. The inner class is a separate class file

8.static class words can be changed to this. Access limitations can only be accessed by static members in external classes.

9.

10.

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.