FileDocCategorySizeDatePackage
ArrayStack.javaAPI DocExample414Fri Nov 03 11:00:18 GMT 2006None

ArrayStack

public class ArrayStack extends Object implements Stack

Fields Summary
private List
list
Constructors Summary
public ArrayStack()

 list = new ArrayList<E>(); 
Methods Summary
public booleanempty()

 return list.size()==0; 
public Epop()

	E elt = list.get(list.size()-1);
	list.remove(list.size()-1);
	return elt;
    
public voidpush(E elt)

 list.add(elt); 
public java.lang.StringtoString()

 return "stack"+list.toString();