Java Reference
In-Depth Information
Appendix
II
Java API and Javadoc
OBJECTIVES
• Describe how to locate and use the specifications of classes in the Java API.
• Investigate extracting specifications from annotated programs.
INTRODUCTION
The Java API specifications describe what each class is for and how it is to be
used. It describes the methods and fields within a class that can be accessed and
what they do. These specifications are on the world wide web, so you have to be
connected to the internet to use them.You can download the specifications, but
they take a lot of space. If you can usually work with a connection to the inter-
net, you are better off doing that rather than downloading.
The Java API specifications were extracted from the Java API .java files
automatically, using a program called Javadoc. You, too, can use Javadoc to
extract specifications of your programs, provided you write your comments in a
special manner. We show you how to do this in Sec. 2 of this Appendix.
II.1
The Java API Specifications
Where to find the Java API specifications
At the time of this writing, the Java API specifications were at this URL:
http://java.sun.com/j2se/1.4.1/docs/api/index.html
This is the specifications for Java 1.4.1. If there is a later version when you
read this, browse until you find it or ask your instructor where a newer version
might be. Actually, for what you are doing based on this topic, you could use this
version as well as a newer one; most of the changes will not affect you.
Search WWH ::




Custom Search