Internal class,
In a class, apart from defining normal variables and methods, a class is defined in the class, and the class in that class is an internal class.
The internal class can be modified in private or static mode when it is in the member position of the external class.
When the internal class defines static members, the internal class must be static.
When the static method of the external class accesses the internal class, the internal class must also be static.
Internal access rules:
Internal classes can directly access the variables and methods of their external classes. Because the internal class holds an external class reference-> external class name. this. Variable (method ).
To access internal classes, an internal class object must be created.
When something is described, there is something inside the thing, the internal thing is described with the internal class, because the internal thing is using the content of the external thing.
An automobile is a whole. The automobile contains components such as engines and tires. These components are also an object. Other components of the automobile can be used to run together, so the components can be expressed as internal components.