Java nested classes and inner classes

Source: Internet
Author: User

You can define another class within one class, which is called a nested class (nested classes), and it has two types: static nested classes and non-static nested classes. Static nested classes use little, and most importantly, non-static nested classes, also known as inner classes (inner). Nested classes are introduced from JDK1.1. Among them, the inner class can be divided into three kinds:
One, the inner class directly defined in a class (outer class);
Second, the inner class defined in a method (the method of the outer class);
Its third, anonymous inner class.




Java nested class (Nested Classes) Summary

Http://www.cnblogs.com/aigongsi/archive/2012/04/24/2467183.html

The use of the class name.

http://blog.csdn.net/nullreference/article/details/7746822


This article is from the "bit accumulation" blog, please be sure to keep this source http://tianxingzhe.blog.51cto.com/3390077/1743188

Java nested classes and inner classes

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.