Java
-----------------------------------------------
Access modifier description
-----------------------------------------------
Private can only be used within this class (visible)
A non-write modifier means that the member can access each other only within the same package
Protected is also within the same package access, the difference above is that: in addition to the same package, other packages of subclasses can also access
Public indicates that the member variables and methods are common and can be accessed under any circumstances
-----------------------------------------------Super Split Line-----------------------------------------------
C#
-----------------------------------------------
Access modifier description
-----------------------------------------------
Private, like Java, can be used only in this class.
Protected is not the same as Java, except that only subclasses can access
Internal can only be accessed in the current assembly
Protected internal is the only combination of a form that is accessed in the current assembly or its own subclass, similar to the one in Java
Protected public access is not restricted.
-----------------------------------------------
Special Note: In C # If the class internal members (methods, properties, fields, etc.) do not write any adornments Fuzeme think private;
The default is internal if the access modifier of the Class (class) is not written.
Assemblies can be understood as current projects, such as when building a 3-tier framework, a solution will have multiple projects (presentation layer, business logic layer, data access layer ...). ), you can use internal if you want to access only the current project.
* The base class has at least the same accessibility as the derived class.
C # and Java access modifiers