J2SE adalah inti/ dasar dari bahasa pemrograman Java. JDK (Java Development Kit) adalah salah satu tool dari J2SE untuk mengkompilasi dan menjalankan program Java. Tool J2SE yang salah satunya adalah JDK 1.5 dapat diunduh pada http://java.sun.com/j2se/, dimana JDK merupakan tool open source dari Sun.

Example:

 

/*************************************************************************
 * Compilation: javac HelloWorld.java
 * Execution: java HelloWorld
 *
 * Prints "Hello, World". By tradition, this is everyone's first program.
 *
 * % java HelloWorld
 * Hello, World
 *
 * These 17 lines of text are comments. They are not part of the program;
 * they serve to remind us about its properties. The first two lines tell
 * us what to type to compile and test the program. The next line describes
 * the purpose of the program. The next few lines give a sample execution
 * of the program and the resulting output. We will always include such 
 * lines in our programs and encourage you to do the same.
 *
 *************************************************************************/

public class HelloWorld {

 public static void main(String[] args) {
 System.out.println("Hello, World");
 }

}

sumber: http://introcs.cs.princeton.edu