java access modifiers

  • Java Access Modifiers

    An access modifier defines the scope of a class or its members. It determines the level of accessibility of the class or its member. By using access modifier you can either allow or restrict accessibility of class, members, variables etc.

    Access modifiers allowed in java

    1. Public
    2. Private
    3. Protected