Home arrow Java & J2EE arrow Page 8 - The Genius of Java

The Richness of the Java API - Java

In this first chapter from the book The Art of Java by Herbert Schildt and James Holmes, the authors highlight certain features of the Java programming language that separate it from other languages. The chapter also covers: memory management, Java's built-in support for multithreading, Java's approach to exceptions as compared to C++, Java's support of polymorphism, and how bytecode enables Java's "Write Once, Run Anywhere" ability and provides security. (ISBN 0-07-222971-3, McGraw-Hill/Osborne, 2003).

  1. The Genius of Java
  2. Simple Types and Objects - The Right Balance
  3. Memory Management Through Garbage Collection
  4. A Wonderfully Simple Multithreading Model
  5. Fully Integrated Exceptions
  6. Streamlined Support for Polymorphism
  7. Portability and Security Through Bytecode
  8. The Richness of the Java API
  9. The Applet, and The Continuing Revolution
By: McGraw-Hill/Osborne
Rating: starstarstarstarstar / 69
May 05, 2004

print this article



Conceptually, computer languages consist of two parts. The first is the language proper, defined by the keywords and syntax. The second is the standard library, which contains a set of classes, interfaces, and methods that are available to the programmer. Although all of the major languages today provide large libraries, the one defined by Java stands out because of the richness and diversity it offers to the programmer. When Java was first created, its library contained a set of core packages, such as java.lang, java.io, and java.net. With each new release of Java, classes and packages have been added. Today, Java gives the programmer access to a truly amazing array of functionality.

Since the beginning, one of the key elements that differentiated the Java library from that provided by other languages was its support for networking. At the time of Java’s creation, other languages, such as C++, did not (and still do not) provide standard library elements that handle networking. By providing classes that easily handled connecting to and using the Internet, Java helped spark the Internet revolution. With Java, the Internet was open to all programmers, not just those that specialized in networking. The functionality in java.net transformed computing.

Another key package of the core Java library is java.awt, which supports the Abstract Window Toolkit (AWT). The AWT enables the programmer to create portable, GUI-based code. That is, by using the AWT classes, it is possible to create a windowed application that uses the various standard GUI elements, such as scroll bars, check boxes, and radio buttons. Because of the AWT, it is possible to create a GUI application that can run in any environment that supports the Java Virtual Machine. This level of GUI portability was unknown prior to Java.

Java’s inclusion of the AWT revolutionized the way programmers thought about the application environment. Before Java, GUI-based programs had to be specifically written for their execution environments. This meant that a Windows program, for example, would need to be substantially recoded to run in an Apple computer. After Java, a programmer could write one program that would execute in both environments. By defining a portable GUI, Java unified the programming environment.

In later years, a lightweight alternative to the AWT was added to Java: Swing. The Swing components are contained in javax.swing and its subpackages. Swing offers the programmer a rich set of GUI components that have enhanced portability. As many of the examples in this book show, both the AWT and Swing give the programmer the ability to produce highly effective, portable GUI-based applications.

Today, the Java library has grown substantially from its initial core. Each new release of Java has been accompanied with additional library support. New packages have been added, and new functionality has been added to existing packages. The Java library has been in a constant state of transformation because it has been responsive to the rapidly evolving computing environment. This ability to adapt and change in short order is part of the genius of Java.

Remember: this is chapter one of The Art of Java, by Herbert Schildt and James Holmes (McGraw-Hill/Osborne, ISBN 0-07-222971-3, 2003). Check it out at your favorite bookstore today.  
Buy this book now.

>>> More Java & J2EE Articles          >>> More By McGraw-Hill/Osborne

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- More Java Bugs Lead to More Attacks
- Oracle's Java One Brings News, Surprises
- Oracle Patches Java Runtime Environment
- Apple Syncs Java Update with Oracle
- Spring 3.1 Java Development Framework Compat...
- Jelastic Java PaaS Availability and Pricing ...
- NetBeans 7.1 Released, Supports JavaFX 2
- SolarWinds Releases Newest Version of Java M...
- Free Monitoring Tool for Java Apps on Heroku
- Heroku Adds JCloud Platform Support, Java 7 ...
- Java SE 8 Speculation in Full Swing
- Java SE 7 Now Available
- New JVM Language and Java Reporting Tool
- Java 7 Release Update and New Eclipse Toolkit
- The Best Java Netbeans IDE Plugins

Developer Shed Affiliates


Dev Shed Tutorial Topics: