Datastrukturer och algoritmer VT08 Generisk Stack i Java public interface Stack { public boolean isEmpty(); public void push(E elem); public E top() throws EmptyStackException; public E pop() throws EmptyStackException; } public class EmptyStackException extends Exception{ public EmptyStackException(){ super(); } public EmptyStackException(String s){ super(s); }
{}