Overview of Java



General Information

What is Java?

Java is a programming language, but there are several aspects to it. Java refers to the virtual machine that executes Java programs. Java refers to the environment in which source programs are developed and the tools that assist in development. Java also refers to the libraries of already developed code.

Sun has bundled the libraries into three separate "editions" aimed at different audiences.

Small: J2ME

The Java 2 Micro Edition (J2ME) provides the basic Java runtime environment intended for embedding in cell phones, palmtops, or other consumer products.

Medium: J2SE

The Java 2 Standard Edition (J2SE) is the one that most people would use. In addition to the runtime system you have deveopment tools like a compiler and debugger. With it you can write and run Java applications and applets.

Large: J2EE

The Java 2 Enterprice Edition (J2EE) contains everything in the standard edition and more. It contains support for enterprise directories, transaction management, and messaging.

Releases of Java

See the Sun Developer Network Site timeline and Java version history. Also J2SE Code Names. Also Java SE Language Features [pdf] by Inyoung Cho.
VersionDateFeatures
JDK 1.0.2Jan 1996I/O, networking, applets
JDK 1.1Feb 1997Inner classes, new event handling model, RMI, JDBC, serialization
JDK 1.2 (Playground)Dec 1998Floating point changes, "Swing" GUI library, collections, reference objects
now called Java 2 Platform
Java 2, SE 1.3 (Kestrel) May 2000CORBA compatibility, Java sound
Java 2, SE 1.4 (Merlin)Dec 2001Assertion statement, pattern matching, Webstart support
Java 2, SE 1.5 (Tiger)Feb 2005Generics, enhanced for loop
Java 2, 1.5.0_09Oct 2006
Java SE 6 (Mustang)Dec 2006
Java SE 7 (Dolphin)

Key features of the Java programming language

Language, extensive libraries, tools. Not just main applications but little programs subservient to browsers (applets), servers (servlet).
  1. ALGOL-like: imperative, strongly-typed, block structured, recursive
  2. C++ like syntax, expressions
  3. objects, interfaces
  4. packages: groups of classes organized in directories
  5. lightweight threads of control
  6. garbage collection
  7. exceptions

Comparison with C++

Syntactically very similar to C/C++. Bears a deaper resembleness to Ada and Modula-3. With respect to C++, there are some important differences:

Brief Glimpse at Libraries

LibraryPurposeExample Classes
Basic runtime support such as strings, threads, reflection, and exceptions , , , , ,
files and input/output , ,
applets
Support for color, fonts, and graphic display , ,
data structures , , ,
networking classes ,
LibraryPurpose
GUI components with improved appearance , , ,
Support for the visually impaired

JDK tool suite

RMI tools

Sun Microsystems develops and controls Java. But others have tools, development environments etc., for example, IBM Jikes compiler for Java. And GNU gcj

Tip: (From van der Linden.) A quick look at a Java API can be had by running javap. For example,

% javap java.util.Random
public class java.util.Random extends java.lang.Object implements java.io.Serializable {
    static final long serialVersionUID;
    public java.util.Random();
    public java.util.Random(long);
    protected synchronized int next(int);
    public boolean nextBoolean();
    public void nextBytes(byte[]);
    public double nextDouble();
    public float nextFloat();
    public synchronized double nextGaussian();
    public int nextInt();
    public int nextInt(int);
    public long nextLong();
    public synchronized void setSeed(long);
}


Ryan Stansifer <ryan@cs.fit.edu>
Last modified: Thu Jan 25 13:23:57 EST 2007