Java Demos

Here are several Java demos, as zip files (for BlueJ projects) or as .java files, or both

arraylisttest: Lets you peek, with the inspector, at the underlying ArrayList space allocation

ratio: Bailey's Ratio class (also and and also ratio.cpp)

linkedlist: A simple linked-list class, with and

recursion1: A class to illustrate recursion for and

Stampchange: a problem hard to solve without recursion; also an answercache example.

binsearch: A demo of binary search, looking for a particular case.

hash: A demo of hashing, including,,, Also and

baileysorting: includes most of the sorting methods of Bailey Chapter 6, in

expressions: a recursive program for evaluating numeric expressions (Mar 27: expr_assign is broken)

TList: a template ArrayList-like class

simpletrees: some simple binary trees of Strings and integers

traversers: some simple and not-so-simple ways of traversing a binary tree

poly: a simple example of polymorphism

compiler: a simple [!] recursive-descent compiler for the (demo) language miniJava.