O'Reilly logo

Programming with Java by Sunil Patekar, Mahesh Bhave

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 15

MISCELLANEOUS TOPICS

15.1 Packages

15.1.1 Defining and using packages

When one has too many files, one needs to organize them in folders (directories). Similarly, when one has too many classes (developed by him) to use, some organization or grouping is needed. Java offers it in the form of package. We know that Java gives us many useful classes to use directly in our programs. These classes are also grouped into packages. The few common packages are applet, awt, color, event, io, lang, math and swing. The complete list of JDK application programming interface (API) packages is presented in the appendix.

A package can be defined as “a collection of related classes and interfaces that provides access protection and ‘namespace management’”. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required