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
- The Java Language Specification, Second Edition, James Gosling, Bill Joy, Guy L. Steele Jr., and Gilad Bracha (Sun Microsystems, Inc., 2000)
- The Java Virtual Machine Specification, Second Edition, Tim Lindholm and Frank Yellin (Sun Microsystems Inc., 1999)
- "Java 2 Platform, Standard Edition, v 1.3.1 API Specification," (Sun Microsystems Inc., 2001) http://java.sun.com/j2se/1.3/docs/api/index.html
- For more Java help from Sun, read the "Java Tutorial"
- Want more? See the Java Q&A Index for the full Q&A catalog
- For over 100 insightful Java tips from some of the best minds in the business, visit JavaWorld's Java Tips index
- Sign up for the JavaWorld This Week free weekly email newsletter for what's new at JavaWorld
- You'll find a wealth of IT-related articles from our sister publications at IDG.net