IntelliJ Java IDE
The moose likes OO, Patterns, UML and Refactoring and the fly likes Erratum? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Reply Bookmark "Erratum?" Watch "Erratum?" New topic
Author

Erratum?

Panagiotis Varlagas
Ranch Hand

Joined: Nov 27, 2000
Posts: 233
"UML Distilled", p.110, paragraph 3:
"Classes within packages can be public, private, or protected".
I believe this to be an erratum. It is not true in Java at least. I don't know what language the author had in mind when coming up with the above statement; unless there is some UML-specific connotation that I am unaware of.
Anyone?
Panagiotis.
Panagiotis Varlagas
Ranch Hand

Joined: Nov 27, 2000
Posts: 233
Unless by "private" what is actually meant is "package-private". But in such a case what would protected really mean?
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
You can have a private inner class (static or non-static).Probably that is what Martin Fowler meant
Hope this helps,
Sandeep


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
Steve Mitchell
Greenhorn

Joined: Jun 03, 2001
Posts: 12
Perhaps Fowler is talking about Facades, which in my edition is on page 116. By using the "public" access modifier sparingly you can, in effect, make the "package" private, saving "public" for the methods you want to expose to the outside world. In that sense the "package" access is the access of the methods of the classes it contains.


Steve Mitchell<br /><a href="http://www.byteworksinc.com" target="_blank" rel="nofollow">http://www.byteworksinc.com</a>
 
IntelliJ Java IDE
 
subject: Erratum?
 
Threads others viewed
exam cram erratum
Yet another erratum
Mughal's mock exam erratum
K&B - Erratum ?
Mughal's mock exam erratum
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture