// Exception for Stack to handle if an empty stack is popped or peeked public class StackEmptyException extends Exception { public StackEmptyException() { super("Cannot pop/peak from empty stack"); } public StackEmptyException(String s) { super(s); } }