Re: Different treatment of the NodeType of LinkedList in C++ and Java

Discussion in 'C++' started by Lew, Oct 29, 2009.

  1. Lew

    Lew Guest

    wrote:
    > 3. Sure it can not be private! Actually, what do you mean by making a
    > type(class) private?
    >


    In Java this is only possible with member types. It means that only
    the class of which the type is a member, and that enclosing class's
    members, have access to that type. In that it is just like any other
    'private' member.

    Again, see
    <http://java.sun.com/docs/books/tutorial/java/javaOO/
    accesscontrol.html>

    That explains very simply the four access types in Java - public,
    protected, default ("package-private") and private. The rules apply
    to all members be they method, variable or nested type. The complete
    rules are, of course, spelled out in detail in the Java Language
    Specification (JLS).

    --
    Lew
     
    Lew, Oct 29, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ebe
    Replies:
    0
    Views:
    385
  2. Replies:
    9
    Views:
    1,140
    Mike Schilling
    Oct 29, 2009
  3. Replies:
    9
    Views:
    446
    Mike Schilling
    Oct 29, 2009
  4. Aziz
    Replies:
    5
    Views:
    149
  5. transkawa

    innerHTML and nodeType

    transkawa, May 28, 2010, in forum: Javascript
    Replies:
    1
    Views:
    94
    Scott Sauyet
    May 28, 2010
Loading...

Share This Page