October 9, 2010 at 4:12 PM
Access modifiers are an integral part of object-oriented programming.Access modifiers can be used to
restrict access, and therefore functionality, to certain classes and methods; often to enhance data integrity and prevent unauthorized alteration or execution of fields and methods of the particular object.
Private : Accessible with in the class only
public : Accessible Any where
protected: Accessible with in the package and sub class of the package also
default: Accessible with in the package only.