Listing 2: File StackException.java — Defines the StackException class

class StackException extends Exception
{
    StackException()
    {}

    StackException(String msg)
    {
        super(msg);
    }
}

— End of Listing —