What is the Package?
It is a concept of similar to “class libraries in other languages”. Packages are java’s way of grouping a verity of classes and/or interface together the grouping is usually done according to functionality. Infact packages acts as container for classes. Following are the benefit :
1. The classes contain in the packages of other program can be easily used .
2. In package classes can be unique compared with class in other packages that is two classes into two different packages can have the same name . They may be referred by their truly qualifying name comprising the package name end.
3. Packages provide a way to hide classes thus preventing other program or packaging from accessing classes that are meant for internal use only.
4. Packages also provides a way for separating design and cording first we can design classes and decide their relationship and we can implemented the java code need for the methods. It is possible to change the implemented of any methods without affecting the rest of the design.
No comments :
Post a Comment