Java Examples
- HelloWorld - The famous program written in Java.
- Sum - Sum up the first 10 integers.
- Sum2 - An improved version.
- Switch - The switch statement.
- Dog.java - The Dog class from week 2
- Dogs.java - The Dogs program that uses
class Dog.
- Circles - The Pacman program.
- Pacmania - The Pacman program
using a class.
- Charts - Some Chart classes
demonstrating inheritance.
- Queue - A
first-come-first-served data structure.
- ReverseArgs
- Reverse the order of its command line arguments.
- ReverseFile
- Reverses order of lines in a file.
- ListStack
- A linked list implementation of a stack along with a test program.
- Tester
- A class for writing test programs. See ListStack for an example of
its use.
- CStack
- A Stack that uses the Java Collections Framework