Java inner class_ Let you see_ Don’t be confused anymore

In a blog: "you can learn something about Java inner classes, but there are still some places in the inner classes that deserve our careful study

Here are some things I have summarized about Java internal classes, which I will share with you

How to understand this?

Look at the following code:

The first concept is not well understood

This involves the relationship between static internal classes and external classes:

This is actually very easy to understand. I don't know if you understand code 15 ~ 23

This is already mentioned in the first one: in line 17 of the one code

Number is a non static member of the external class, and innumber can access number as a member of the non static internal class

Is it easy to understand

To sum up:

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>