Advertisement
BiggestEl

Untitled

Nov 27th, 2020
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. if (monthName != "January") {
  2. throw new IllegalArgumentException("Month(): bad month name");
  3. }
  4.  
  5. Output when a month is not typed:
  6. Exception in thread "main" java.lang.IllegalArgumentException: Month(): bad month name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement