I see at the bottom of your month number validation if..else:

else {
System.exit(0);
From API docs for System.exit(int):

You exit with a zero value to indicate "success",...