2

Possible Duplicate:
What package naming convention do you use for personal/hobby projects in Java?

I made a google sites site name sites.google.com/sites/abc.(abc is not real name)

Would mcl.abc.sites.com.google.sites be valid for a package name.

EDIT: Whoops com.google.sites.abc.mcl

Community
  • 1
  • 1
hjarrell
  • 31
  • 1
  • 7
  • 3
    It'd be more traditional to use `com.google.sites.mcl.abc`, I think? – Louis Wasserman Aug 28 '12 at 23:31
  • I am annoyed because this question has been marked as duplicate. The question of validity is something different than the question of conventions. There are two different words in english language - so why not use them properly? Please bear in mind that questions are not only interesting for the OP, but for others, too. – Gustave Mar 07 '18 at 11:06

3 Answers3

5

Valid? Yes. Conventional? Probably not.

Java conventions typically recommend package names to be a website address (like your company's) in reverse, e.g. com.google.foo.

More on naming conventions here.

Tyler Treat
  • 14,640
  • 15
  • 80
  • 115
0

you can use any name, but if its valid its about the criteria that you use, i recommend the following criteria:

1) avoid to use country.company.util (i work in a project that the company change 3 times of name, so you can see in the same project names like: com.companyname1.util, cl.companyname2.util, com.companyname3.util) 2) you can use naming like: dev.utils or apiname.commons.utils or any other criteria

Well, i hope this clarify your doubts.

Enrique San Martín
  • 2,202
  • 7
  • 30
  • 51
0

Standard coding convention for packages in Java reverses the domain name.

Given your example,

sites.google.com/sites/abc

com.google.sites.abc.mcl
M.Octavio
  • 1,780
  • 2
  • 25
  • 39