- The Hello program:
- A simple Point class
- The euclidean algorithm to compute the gcd of two integers
- Printing a diamond graph
- Printing n Fibonacci numbers
- Overflow and roundoff errors.
- Printing the integer values of the printable ASCII characters
- An example that shows a usage of a command line parameter and of the substring method for Strings. It prints proper heads and tails of a string.
- Using Scanner on a String
- Redirecting a file to standard input
- Decimal and binary representation of an integer
- Generating a random permutation.
- The Birthday Paradox
- Collecting quarters from all states
- Linear search
- Selection sort
- Binary search
- Insertion sort
- Merging two sorted arrays
- Copying a file
- Merging two sorted files
- A random number generator
- Rotating the elements of an array

Many more examples are in The Java Developers Almanac 1.4