Most of Java (all excluding the primitive data types) is a collection of classes and a set of keywords and syntax to manipulate and use those classes. There are several classes that belong to Java, so the language is broken down into several packages.
package java.applet
package java.awt
package java.awt.datatransfer
package java.awt.event
package java.awt.image
package java.awt.peer
package java.beans
package java.io
package java.lang
package java.lang.reflect
package java.math
package java.net
package java.rmi
package java.rmi.dgc
package java.rmi.registry
package java.rmi.server
package java.security
package java.security.acl
package java.security.interfaces
package java.sql
package java.text
package java.util
package java.util.zip
The java.applet package contains the Applet class and three related interfaces. Applet is the superclass of all applets. An applet is a Java program that can be executed over the internet via a Java enabled browser. An application which does not extend Applet is a stand alone application that can be executed from the command line through a Java interpreter. An application needs to supply a main() method to execute.
Classes
Interfaces
The java.awt package is the Abstract Windowing Toolkit. There are roughly three categories of classes in the awt package.
The java.awt.image package is used to support image processing. This package is not the source of images.
The java.awt.peer package consists entirely of interface definitions. The only time the interfaces in peer are implemented is when you are porting to a new platform.
The java.awt.datatransfer package introduced first in Java 1.1. It is responsible for data serialisation. The package brings The Clipboard/Drag-andDrop mechanism to Java. (Drag-and-Drop portion will be released later this year.)
The java.awt.event package structure system events into different categories. It helps to introduce the Delegation Event Model allowing to separate GUI from Event processing.
Graphics colors, fonts, images ...
Components buttons, menus, lists ...
LayoutManagers controls layout of components in containers
The awt is discussed in more detail in a later chapter.
java.io is used for both screen and file input / output. Java applets can not use file io for security reasons.
Classes
Interfaces
java.lang has the classes that are more central to the language. Most of the classes are separate and have no direct relationship with one another.
The Thread class is a very powerful class that separates Java from many other languages.
Classes
Interfaces
New methods of Class and two new classes Byte and Short in the java.lang package also supports reflection.
The java.net package provides different ways to communicate over the network. URL, Socket and Datagrams are the primary classes for network communication.
Classes
java.util.zip package allows to use a popular "ZIP" compressed files.
java.util contains several useful classes that many of the Java classes depend on. Date, Vector and Hashtable are just some of the most frequently used classes.
Classes
Interfaces