I see at the bottom of your month number validation if..else:
From API docs for System.exit(int):
The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.
You exit with a zero value to indicate "success", "normal", "we're good!" etc. A month value *not* in the range 1-12 is not good.
Ideally you'd also explicitly say why the program has terminated - an *exceptional* outcome. Magic exit values are so last millennium. A Java-style way of doing this might be like this:
public class Exercise03_11
{ // place brackets according to local convention. I've moved this one because I'm anally retentive
// a final static array of months gives you instant integer-to-month-name goodness
private final static String[] MONTH_NAMES = {"January", "February", /* 9 more */ "December"};
public static String getMonth(int monthNumber)
{
// the month-number-to-array-index shift is an *implementation detail* which is why we hide it inside this method
return MONTH_NAMES[monthNumber - 1];
}
...
public static void main(String[] args)
{
...
int month = input.nextInt();
System.out.println("Month number " + month + " is " + getMonth(month));
}
... so you could replace your massive if..else with just a couple of lines *and* expose it as a public static method, so that the next time you're writing exercise code and need a month-number-to-name conversion, you can just code:
System.out.println("the month is " + Exercise03_11.getMonth(myMonthNumber));
... but what's really good about doing it this way is that you no longer need your System.exit(int) because Java will throw an Exception with useful information in it if the user types something other than 1-to-12 for the month. Try it out and see what happens.
I don't think it would be a good idea to copy-and-paste this into your homework: it'll be very obviously not your code. I just thought I'd throw it in so you could compare it with your own code for how someone else might code this in Java and what other features of Java can reduce the amount of typing you have to do *and* make your code more reliable and useful.