Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class LessThanOrGreaterThanException extends RuntimeException {
- public LessThanOrGreaterThanException() {
- super("\n**** Your number is either less than the min or greater than the max.");
- }
- public LessThanOrGreaterThanException(String myField, int myNumber, int minNumber, int maxNumber) {
- super("\n*****" + myField + ": " + myNumber + " is less than " + minNumber + ", or greater than " + maxNumber);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement