Java vs. C#

Access Modifiers


Java
 
public
   Access not limited
protected
   Access limited to the package or 
   subclass in a different package
(no access modifier)
   Access limited to the package
private
   Access limited to the containing type





C#
 
public
   Access not limited
protected
   Access limited to the containing class or
   types derived from the containing class
protected internal
   Access limited to this program or
   types derived from the containing class
(no access modifier)
   by default it is private
internal
   Access limited to this program
private
   Access limited to the containing type