learn java
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

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java Package" Watch "Java Package" New topic

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 ~

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 31680

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.

[OCA 8 book] [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
Have you tried LearnNowOnline? http://www.learnnowonline.com/
subject: Java Package