Back Button
Back to Chapter
Introduction
No items found.
Collapse_Icon
Table of Contents

A java package is a group of similar types of classes, interfaces, and sub-packages providing access protection and namespace management. Package in java can be categorized in two forms, built-in package, and user-defined package.

Advantage of Java Package

  1. Java package is used to categorize the classes and interfaces so that they can be easily maintained.
  2. Java package provides access protection.
  3. Java package removes naming collision.

Some of the existing packages in Java are −

  • java.lang − bundles the fundamental classes.
  • java.io − classes for input , output functions are bundled in this package.
  • java.util - classes such us vectors, hash tables, random numbers, date.
  • java.awt - classes for windows, buttons, lists, menus etc.
  • java. net - classes for networking.
  • java.applet - classes for creating and implementing applets.