Just what is the Java API anyway?

How the Java API specification fits into the Java universe

Q: The Java API -- what is it and how does it fit into the Java language?

A:
  • The Java language
  • The Java Virtual Machine (JVM)
  • The Java API (Application Programming Interface)

The Java language defines the syntax and semantics of the Java programming language. It defines basic vocabulary such as primitive types, if/else blocks, the syntax of class declaration, exception syntax, variable scoping rules, and everything else necessary for the language to function. For a complete description of the Java language see: "The Java Language Specification."

The JVM executes Java bytecode. Normally, you produce Java bytecode by compiling code that conforms to the Java language. (However, you can compile code written in other languages into Java bytecode.) For a description of the JVM see: "The Java Virtual Machine Specification."

The Java API is the set of classes included with the Java Development Environment. These classes are written using the Java language and run on the JVM. The Java API includes everything from collection classes to GUI classes. You can view a complete listing of the Java API at: "Java 2 Platform, Standard Edition, v 1.3.1 API Specification."

Tutorials are also available at: "Java Tutorial."

Learn more about this topic

Join the discussion
Be the first to comment on this article. Our Commenting Policies