Java package: Difference between revisions

Content deleted Content added
النال
Tags: Visual edit Mobile edit Mobile web edit
Undid revision 866777483 by 37.127.100.26 (talk)
Line 50:
 
==Package naming conventions==
Packages are usually defined using a [[hierarchical]] naming [[pattern]], with some levels in the hierarchy separated by periods (ض<code>.</code>, pronounced "dot"). Although packages lower in the naming hierarchy are often referred to as "subpackages" of the corresponding packages higher in the hierarchy, there is almost no semantic relationship between packages. The Java Language Specification establishes package naming conventions to avoid the possibility of two published packages having the same name. The naming conventions describe how to create unique package names, so that packages that are widely distributed will have unique namespaces. This allows packages to be separately, easily and automatically installed and catalogued.
 
In general, a package name begins with the top level ___domain name of the organization and then the organization's ___domain and then any subdomains, listed in reverse order. The organization can then choose a specific name for its package. Subsequent components of the package name vary according to an organization's own internal naming conventions.<ref>[http://www.oracle.com/technetwork/java/codeconventions-135099.html Code Conventions for the Java Programming Language: 9. Naming Conventions]</ref>