The root of the API specifications of the Java platform reveals that a library is made up of packages.
| Java 2 Platform Packages | |
| java.applet | Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context. |
| java.io | Provides for system input and output through data streams, serialization and the file system. |
| java.lang | Provides classes that are fundamental to the design of the Java programming language. |
| java.net | Provides the classes for implementing networking applications. |
The java.lang tells us that a package may deal with classes (of objects): concrete, interface, abstract, exception, and error.
| Interface Summary | |
| Cloneable | A class implements the Cloneable interface to indicate to the Object.clone() method that it is legal for that method to make a field-for-field copy of instances of that class. |
| Comparable | This interface imposes a total ordering on the objects of each class that implements it. |
| Class Summary | |
| Math | The class Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions. |
| Object | Class Object is the root of the class hierarchy. |
| String | The String class represents character strings. |
| System | The System class contains several useful class fields and methods. |
| Exception Summary | |
| ArithmeticException | Thrown when an exceptional arithmetic condition has occurred. |
| SecurityException | Thrown by the security manager to indicate a security violation. |
| Error Summary | |
| IllegalAccessError | Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to. |
| OutOfMemoryError | Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector. |
The Math class indicates the inclusion of fields within classes.
| Field Summary | |
| static double | E The double value that is closer than any other to e, the base of the natural logarithms. |
| static double | PI The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter. |
The above table lists the ‘E’ and ‘PI’ fields.
The Math class also indicates the inclusion of methods within classes.
| Method Summary | |
| static double | random() Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0. |
| static double | sqrt(double a) Returns the correctly rounded positive square root of a double value. |
The above table shows the ‘random’ and ‘sqrt’ methods.
The Object class indicates the inclusion of constructors within classes.
| Constructor Summary |
| Object() |
The above table exhibits a constructor named ‘Object’. (Note that the class is also named ‘Object’!)
The String class indicates the possibility of having multiple methods and constructors of the same name. Such constructors and methods are said to be overloaded.
| Constructor Summary |
| String() Initializes a newly created String object so that it represents an empty character sequence. |
| String(byte[] bytes) Construct a new String by converting the specified array of bytes using the platform’s default character encoding. |
| Method Summary | |
| String | substring(int beginIndex) Returns a new string that is a substring of this string. |
| String | substring(int beginIndex, int endIndex) Returns a new string that is a substring of this string. |
The Math class indicates the inclusion of the features defined in the Object class.

Logical organization reflecting on inheritance relationships-not on arbitrary packaging organization.
Due: Fr, Apr 4, at class
Answer the following questions for the Java 2 Platform, Standard Edition, v 1.4