This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
First of all, you should keep package names all lower-case Using a domain name for package names is a common practice to avoid having two libraries conflicting. If you're just practicing, you can keep it simple.
hold separate packages based on your operation for example com.domainname.projectname.persistence ==> Keep all classes to database operation com.domainname.projectname.controller ==> Keep all your interface based class com.domainname.projectname.utilities ==> Keep all your utility methods.
Talking about naming, could you read the Naming policy and change your name accordingly ? Thank you
Joined: Feb 14, 2007
This is the fifth time, I have changed my name. I really did not get the naming policy at all. Please help with the same. I tried display name to be my fist-name with initials, last name with initial, first name-last name, javaranch user name. But I get whacked for everything :-). Please advise
Originally posted by satsranchuser: This is the fifth time, I have changed my name. I really did not get the naming policy at all. Please help with the same. I tried display name to be my fist-name with initials, last name with initial, first name-last name, javaranch user name. But I get whacked for everything :-). Please advise
Your current screen name, "Sathish Kumar", currently should pass -- meaning you should not be whacked...
There is some talk about disallowing "smith", "doe", "kumar", and other names that get abused (ie. ficticious), but it is okay for now.
I'm revisiting this because I'm starting to work out of a book that uses JUnit. They suggest having all your source files under a structure of c:\java\src\com\domainname\packagename and c:\java\test\com\domainname\packagename.
So let's say I just start a new project that will have one class and one test; will the workspace be c:\java\src, and when I create a package I'll call it com.domainname.packagename. Will that work? should I start all my projects in the workspace of c:\java\src and then create the package names as above? thanks, jason