parameter passing example; Java code for list/array implementations of stacks