The Java 1.3 API

   

As you progress through this book, you will become familiar with the meanings of the Java keywords and their uses. You will also become familiar with the functionality provided in the SDK class library.

One of the reasons for Java's success is the rich class library provided through the Java Application Programmer Interface, or API. The Java API is a set of classes developed by Sun for use with the Java language. It is designed to assist you in developing your own classes, applets, and applications. With these classes already written for you, you can write an application that is only a few lines long, as opposed to the hundreds of lines that would be necessary to develop the same functionality from scratch. The simple implementation of this chapter's HelloApplet example is only possible because of the functionality provided by java.applet.Applet and java.awt.Graphics. Even the HelloWorld examples relied heavily on the stream classes accessed through System.out and System.in.

Although it's unlikely that you will have great success understanding the API until you have finished reading several more chapters, it's important to start looking at it now. A key measure of proficiency in Java is based on knowing what is available in the API and how to use it. Remember that Java provides a lot of functionality to you out of the box, and you should build up your knowledge of the API so you don't end up reinventing the wheel.

You can access a hyperlink version of the API documentation on Sun's site at http://java.sun.com/j2se/1.3/docs/api/index.html. If you download the documentation as part of your SDK install, you can also access the API documentation by opening index.html in the docs/api subdirectory of your install directory.

When exploring the API, you should notice how various classes inherit from others using the extends keyword. Sun has done a great deal of work to keep you from having to write nearly as much code; you must learn to make good use of the classes that are already there.

   


Special Edition Using Java 2 Standard Edition
Special Edition Using Java 2, Standard Edition (Special Edition Using...)
ISBN: 0789724685
EAN: 2147483647
Year: 1999
Pages: 353

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net