GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes Java Package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java Package" Watch "Java Package" New topic
Author

Java Package

Lee Kian Giap
Ranch Hand

Joined: Jan 23, 2008
Posts: 213
I come to a doubt on "How to use package in Java?"
I doesn't mean the naming convention of package (such as using reverse domain name e.g. com.abc.xxxxxxx)

What I wish to ask is , let say my project involve 50 java files , how do I going to group them into different package ?
Anyone know whether there is Best Practice on doing this ?
e.g. package by function , package for access control purpose ??? or any other suggestion from working experience ???

Thanks in advance ~


SCJP 6, SCWCD 5, SCBCD 5
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30580
    
154

Lee,
It really depends what you have. The distinctions you described work. If the packages are large, you'd want to divide them further by function.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
 
subject: Java Package