Here is the answer.
You can define your own package to wrap up group of classes/interfaces etc. Using package provide effective management of application as all the related things to a project or application are bundled together under the same package.
Due to new name space created by package, there won't be name conflict between classes. It is also easier to locate the related classes. The package statement should be the first name in the file. Each source file can have only one package statement. If The package is not included, then the class, interface, enumerations, and annotation types will be put into an unnamed package.
You can declare package as :
For using another class of different package, first we need to make it available for class using 'import' keyword as :