Prev Next

Java / Package

What is a Java package?

Posted on Apr 1, 2016 by Senthil Kumar.

Package is a collection of related classes and interfaces. Related classes will have the package defined using package keyword.

package packageName.subpackageName;

Any java class/interface will have the package declaration as the first statement.

package is optional however it is common practice to place the java class under a package.

More Related questions...

Show more question and Answers...


Comments & Discussions