or drag border to resize
Best viewed with Firefox
Bitcoin donation, thank you
1N3GzjrsHJgZFb46X1dHRBWkxvEEdTqsao
Post this site to
JavaLessons.com

Java Fundamentals

Previous Next

3. API

The Java Standard Edition library contains many software components/modules, classes, that contain methods, belonging to that class, so the java.lang.String class contains methods for dealing with strings, like
indexOf, substring, startsWith, length. The Graphics class, in turn, contains many drawing methods. Likewise, each class contains methods that belong to that category, to that class.
Each class is a wheel already invented, ready to be used in whatever application.
The library is divided into different packages. The language package, lang, contains classes that are of general importance.
The awt package contains classes that you can use for the user interface, like Button, Menu, TextField and the likes.
There are many packages, that each contain classes that belong there.
applet : classes for making applications within html or other documents.
net :  networking
util :  utilities
swing :  more sophisticated user interface
and many more.

Much of the library has been zipped into one file, rt.jar, Runtime Java Archive. A JAR can be inspected using a tool like WinZip ( or you could copy it and change the copy's extension to .zip).
Notice the tiny sizes of the classes in the picture at the bottom of this page, the java.awt.Button.class, 3877 bytes, NOT KBytes.
The output of the program below, SEMMAp, is
You can always lookup information about classes in the documentation, f.i. the String class or the Graphics class, where the most interesting parts are always 'what can you make them do': what methods do they have. Try to find the methods used in this lesson.



Essence


Double-click to select or

JAVALESSONS.COM

Copyright © 2000-2014 System Exclusive & Multi Midi (NL) All rights reserved

Terms, conditions, disclaimer