0

I have seen this so often and it confuses the hell out of me.

I always title the packages directly after what they are. For example the path to my Main class is never "me.myproject.main.Main.class" but only "main.Main.class" and so far I have never had problems with it.

However I have seen everyone doing it otherwise so often, that I wonder: Is that really just a meaningless convention (like for (int i = 0...)) or does it actually have practical use adding all that, that just isn't apparent to me?

Jonas Bartkowski
  • 357
  • 1
  • 6
  • 15
  • If you ask me, as an independent programmer, it doesn't matter what you name your package. Unless you're sharing packages with other devs, and theres a chance you both might have the same name for a package, i find the convention to be a drag. Dont use default package (cant import from there) and you should be fine – Vince May 02 '14 at 22:24

1 Answers1

1

Packages are usually named using the reverse-domain name of an organization, ie. com.example.projectname.Main.class. If everyone were to name their packages main.Main.class, what would happen if you were using my code in your project? You would end up with conflicting main.Main classes.

savanto
  • 4,470
  • 23
  • 40