Class Stack2

java.lang.Object
  extended byStack2

public class Stack2
extends Object

Implementation of a stack as an array


Constructor Summary
Stack2()
           
 
Method Summary
 Object peek()
           
 Object pop()
           
 void push(Object element)
           
 int size()
          Size is simply the top index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stack2

public Stack2()
Method Detail

push

public void push(Object element)

peek

public Object peek()

pop

public Object pop()

size

public int size()
Size is simply the top index