2.2.3 Using the API Guide
API stands for Application Programming Interface and the API guide
introduces you to and documents the Java classes and packages.
This is your most important guide to use when writing Java programs:
here you look up what is already available and how classes can be used.
The format of the class pages is always the same. So once you know
how to read one page, say
the page about the
Font
class, you should be able to read others as well.
The format of an API page about classes is as follows:
- Class definition
- The definition of the class showing
- what kind of class it is;
- how it relates to other classes;
- what instance variables are present;
- what methods are present;
- a short description of what the class is meant for.
- Fields
- Details about the instance variables, called fields, of the class.
- Constructors
- Information on how instances of the class can be created.
- Methods
- Details about the methods of the class:
- how they are called and what is the type of the object they return.
This information is known as the signature of the method.
- short descriptions of what the methods are supposed to do.