FileDocCategorySizeDatePackage
Stacks.javaAPI DocExample192Fri Nov 03 11:00:18 GMT 2006None

Stacks.java

class Stacks {
    public static Stack reverse(Stack in) {
	Stack out = new ArrayStack();
        while (!in.empty()) {
	    Object elt = in.pop();
	    out.push(elt);
	}
	return out;
    }
}