Java is two things: a programming language and a platform.
The Java Programming Language
Java is a high-level programming language that is all of the following:
# Simple
# Architecture-neutral
# Object-oriented
# Portable
# Distributed
# High-performance
# Interpreted
# Multithreaded
# Robust
# Dynamic
# Secure
Java is also unusual in that each Java program is both compiled and interpreted. With a compiler, you translate a Java program into an intermediate language called Java bytecodes--the platform-independent codes interpreted by the Java interpreter. With an interpreter, each Java bytecode instruction is parsed and run on the computer. Compilation happens just once; interpretation occurs each time the program is executed. This figure illustrates how this works.

Java bytecodes help make "write once, run anywhere" possible. You can compile your Java program into bytecodes on any platform that has a Java compiler. The bytecodes can then be run on any implementation of the Java VM. For example, the same Java program can run on any Microsoft Windows XP,Vista,NT , Solaris, and Macintosh.

The Java Platform
A platform is the hardware or software environment in which a program runs. The Java platform differs from most other platforms in that it's a software-only platform that runs on top of other, hardware-based platforms. Most other platforms are described as a combination of hardware and operating system.
The Java platform has two components:
# The Java Virtual Machine (Java VM)
# The Java Application Programming Interface (Java API)
The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets.