[193] in java-interest
Re: non-public classes in packages
daemon@ATHENA.MIT.EDU (Charles L. Perkins)
Mon Jun 5 16:05:35 1995
Date: Mon, 5 Jun 95 15:43:12 -0400
From: "Charles L. Perkins" <clp@home.HarvardSq.com>
To: java-interest@java.Eng.Sun.COM
A private class should not be visible or accessible outside the package.
However, a private method or instance variable is visible but not accessible
outside the class. Arthur van Hoff (avh@eng.sun.com)
I've already reported the JavaSpec.'s lack of any definition for a private
class (or interface), but since the above appears to define it for me, am
I now to assume that the default case is identical to private, i.e., that:
class C ...
and
private class C ...
both limit the class's visibility and access to the current package? And
is the same true for interfaces?
Also, if private variables and methods are visible outside the package,
they still pollute the namespace of any package that imports them!?! Is
this really the case? I could see "protected" wanting to act this way
perhaps, but not private. Arthur, can you clarify these points?
Charles L. Perkins
Virtual Rendezvous
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com