Jump to content
Wikibooks The Free Textbook Project

Java Programming/Keywords/package

From Wikibooks, open books for an open world

This is the current revision of this page, as edited by Strange quark (discuss | contribs) at 18:36, 4 July 2017 (Fix categorization). The present address (URL) is a permanent link to this version.

Revision as of 18:36, 4 July 2017 by Strange quark (discuss | contribs) (Fix categorization)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

package is a Java keyword. It declares a 'name space' for the Java class. It must be put at the top of the Java file, it should be the first Java statement line.

To ensure that the package name will be unique across vendors, usually the company url is used starting in backword.

Syntax:

package  package;

For example:

Computer code
packagecom.mycompany.myapplication.mymodule;


See also:

AltStyle によって変換されたページ (->オリジナル) /