7 Replies Latest reply: Jan 4, 2005 2:46 PM by 807596 RSS

    Error in Java Tutorial regarding Default access specifier for members???

    807596
      I would like to find out if there is an error in the Java Tutorial's section 'Controlling access to members of a class' which is available on the following URL:

      http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html

      Specifically, according to the given chart of access specifiers it seems that subclass can access ONLY either Protected members or Public members. The members that have Default or Package access are not accessible via subclasses according to the chart . When I tested using some code, I was able to access default members inside a subclass.

      So is the tutorial wrong or my understanding is not right? Anyone? Please help!!!

      Thanks,
      Kasuri