Home   Info   DevZone   Wiki  
UsersWeb  |  MainWeb  |  InfoWeb  |  DevZoneWeb  |  SupportWeb
FileOrganization ] [ not logged in ] [ Web: Imported ] goto:  options
[ get info on or edit ] login or new user ] [ list of topics, hubs & nodes, or recent changes ]

Sun thinks it's OK to put private classes in the same source file as the public class they are associated with. Lea doesn't. I think Lea's right. If the classes need refactoring, it will be easier to do if we don't have to manually strip code out of one file and move it into another one.

I'm not sure that either of them are ideal candidates for beginning comments, although I like Lea's idea of explaining why this class is in a particular package. --BillRehm


Opening comments need to give javadoc (or something more powerful on XML) something to do. They also need to explain whatever the code itself doesn't, such as why this class is here, and perhaps even a hint or two about Interfaces and APIs if it comes to that. Lea's guide seems much more capable, and his attitude/style are more conducive to programming. In places, Sun's guide looks like a man page for a text formatter.





Content of these pages are owned and copyrighted by the poster.
Hosted by: