The Artima Developer Community
Sponsored Link

Java Answers Forum
Java package naming conventions

3 replies on 1 page. Most recent reply: Apr 12, 2002 5:50 PM by Singh M.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Hiran

Posts: 41
Nickname: jclu
Registered: Mar, 2002

Java package naming conventions Posted: Apr 12, 2002 7:26 AM
Reply to this message Reply
Advertisement
What are the java package naming conventions for an individual without a website? I know that for corporations (or for those who have personal websites) the package is usually named <code>com.artima.testapp</code> (as an example). But I don't have a website, so what how should I name my packages? Thanks.
Hiran


Singh M.

Posts: 154
Nickname: ms
Registered: Mar, 2002

Re: Java package naming conventions Posted: Apr 12, 2002 7:57 AM
Reply to this message Reply
Package naming does not have anything to do with having a web-site or not. It is just a way of organizing your classes. Eg. you can have a package called xxx.yyy.employee, which might contain classes related to employee.

Employee - which denotes an employee.
EmployeeAddress - represents address of Employee and so on.

Hiran

Posts: 41
Nickname: jclu
Registered: Mar, 2002

Re: Java package naming conventions Posted: Apr 12, 2002 8:22 AM
Reply to this message Reply
Then can I have a package name that only contains the name of the application? (Eg, <code>package employee;</code>). That's what I've been doing so far (though all the apps I done that for are half finished apps that I've never released). Thanks.
Hiran

> Package naming does not have anything to do with
> having a web-site or not. It is just a way of
> organizing your classes. Eg. you can have a package
> called xxx.yyy.employee, which might contain classes
> related to employee.
>
> Employee - which denotes an employee.
> EmployeeAddress - represents address of Employee and
> so on.

Singh M.

Posts: 154
Nickname: ms
Registered: Mar, 2002

Re: Java package naming conventions Posted: Apr 12, 2002 5:50 PM
Reply to this message Reply
probably, you are not using the concept of packages judiciously.

Bruce Eckel in his book "Thinking in Java" has got a nice explanation for the things you might be looking for.

Just check it out...(BTW, the book is avaialable online for free)

Flat View: This topic has 3 replies on 1 page
Topic: Question about ChatServer and ChatClient! Please help! Urgent Previous Topic   Next Topic Topic: Amazing Job Openings

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use