Java uses CamelCase as a practice for writing names of methods, variables, classes, packages, and constants.
Naming Conventions Package names are written in all lower case to avoid conflict with the names of classes or interfaces. Companies use their reversed Internet domain name to begin their package names—for example, com. example. mypackage for a package named mypackage created by a programmer at example.com .
The package name of an Android app uniquely identifies your app on the device, in Google Play Store, and in supported third-party Android stores.
If you're just doing personal projects where nobody else will use the code, then you can make up a package name that you like. Don't make up something that starts with com.
or net.
or other top-level domain though, because that would imply that you own the domain name (ie. using com.john
as your package name just because your name happens to be John is not a good idea).
If you're going to give the code to anybody else, you should use a globally unique package name, which according to Java conventions means you should register and use a domain name.
I just use my initials: fg.nameofproject.etc
It reduces typing. It can be prefixed at any time with sf.net or com. or org. or com.google..
As the project is personal treat it special just like your freshly pressed personalized gift shirt - it will feel good.
<sarcasm>
Bah. Any self-respecting programmer would have his or her own domain name. This is clearly a trick question. Everyone has their own personal domain name! </sarcasm>
:-)
Ok, in all seriousness, buying a custom domain name is probably the easiest option. For about $10 a year, you can find reputable providers to host the domain and forward email.
pmurray_at_bigpond_dot_com.project.package
I store most of my hobby projects in Google Code, so I just use the project site as the package name: com.googlecode.donkirkby.someproject
.
my name is anjan
usually, I use com.anjan
I have a fantasy company of my own -- sometimes I use that
the tradition with sourceforge(as hibernate and other packages showed) is net.sf.*
so, depending on your mood, you can go with that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With