Possible Duplicate:
Java packages com and org
I am a java developer. Nowadays I am learning struts and when reading a tutorial a curiosity intruded in my mind regarding
package com.something.something;
I know it is a very simple package declaration but what about
package **com**.something.something;
This package name fragment often comes in many commercial distributions. Now I want to know what does it mean? Please clarify it.
Thanks and sorry if I couldn't clarify it...
prefix in package names means the same as .com suffix in domain names: "commercial".
Reverse domain name notation (or reverse-DNS) is a naming convention for components, packages, types or file names used by a programming language, system or framework. Reverse-DNS strings are based on registered domain names, with the order of the components reversed for grouping purposes.
A java package is a group of similar types of classes, interfaces and sub-packages. Package in java can be categorized in two form, built-in package and user-defined package. There are many built-in packages such as java, lang, awt, javax, swing, net, io, util, sql etc.
Package names are all lowercase, with consecutive words simply concatenated together (no underscores). For example, com.
It's just a namespace definition to avoid collision of class names. The com.domain.package.Class
is an established Java convention wherein the namespace is qualified with the company domain in reverse.
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