public class JInvalidNumberException extends Exception {
String mistake;
public JInvalidNumberException()
{
super();
mistake = "Unknown error.";
}
public JInvalidNumberException(String reason)
{
super(reason);
mistake = reason;
}
}
Above is customized exception that is created to be thrown when a invalid postal code enter by a user.
Sunday
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment