Java Libraries

All Java programs use methods from libraries to perform their tasks. This is a selective list of the libraries available to be imported and a general description of the classes they contain. The information on this and linked pages is summarized from Bell & Parr appendix A 1

The import statement allows the programmer to abbreviate th name of a method. By importing a package the programmer is able to use the short name of a method, rather than use the full name.

java.lang

Contains classes that support the main features of the language such as objects, strings, numbers, exceptions and threads. The java.lang package is automatically imported into every Java program, as it provides basic methods which are used by every Java program.

java.util

Contains useful utility classes such as Random and ArrayList.

java.io

Text input and output for characters and numbers.

java.net

Networking functions and interacting with the the Internet.

java.awt

Abstract Windows Toolkit. Provides for windows, buttons, text fields, menus etc.

java.applet

Provides for Java applets which run in web pages.

Bibliography
1. Douglas Bell & Mike Parr, Java For Students, 3rd Ed., Prentice Hall (2002)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License