Review:    accessibility modifiers

  • So far, we have learned 3 types of accessibility modifiers:

      Modifier     Accessed    Accssed       Access 
      on members   from the    from the      from a
      in a class   same class  same package	 diff. package
     ====================================================
      public           OK         OK            OK         open
      default          OK         OK            No
      private          OK	      No            No         limited

  • The default accessibility modifier was discussed in Chapter 9.8 in the text book and my material is here:


  • Java has one more access modifier that:

    • Allow a subclass method to access specific members in the superclass

    • Disallow a non-subclass method from accessing these members