Powered by Blogger.

PACKAGE

No comments :
To create a package is quite easy: simply include a package command as the first statement in java source file. Any classes declared within that file will belong to the specified package. The package statement defines a name space in which classes are stored.If you omit the package statement, the class names are put into the default package. This is the general form of the package statement:         
                                                                    package pkg;
Here, pkg is the package name of the package. You can create a hierarchy of packages. To do so, simply separate each package name from the one above it by use of a period.The general form of a multileveled package.
                                                            package pkg1.pkg2.pkg3;
A package hierarchy must be reflected in the file system of your java Development system.

A Short Package Example:

No comments :

Post a Comment

Please Write a Message for Programming or something Related issues.