Java has four categories of protection access for methods and variables:
(default, or package – no access modifier specified)
C# has five categories of protection access:
 If you have done C++ before, you might have heard of C++'s friend keyword. Both Java and C# have discarded the 'friend function' feature of C++. friend is not a keyword in both Java and C#.
Java's default (also known as package) accessibility is no longer there, and there is a new accessibility category based on the internal modifier in C#.
Table 8.1 shows more information about C#'s accessibility options.
Table 8.2 shows the applicable accessibility modifiers for the various ...