ReverseArgs.java

class ReverseArgs {


    static public void main(String[] arg) {
	Stack stack = new Stack();

	//push all of the args onto a stack
	for (int i=0; i<arg.length; i++) {
	    stack.push(arg[i]);
	}

	//pop them all off in reverse order
	while (stack.notEmpty()) {
	    System.out.print( stack.pop() + " " );
	}
	System.out.println();
    }
}

Generated by GNU enscript 1.6.3.