For this Question: Write a program print total number of days in a month using switch case.First line of the input contains Month Number

<b>Constraints</b>
1 <= Month <= 12Print total number of days in a month (in general).Sample Input :
3

Sample Output : 
31, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args) {
        Scanner sc=new Scanner(System.in);
        int month=sc.nextInt();
        switch(month)
        {
            case 1:
                   System.out.println("31");
                   break;
            case 2:
                   System.out.println("28");
                   break;
            case 3:
                   System.out.println("31");
                   break;
            case 4:
                   System.out.println("30");
                   break;
            case 5:
                   System.out.println("31");
                   break;
            case 6:
                   System.out.println("30");
                   break;
            case 7:
                   System.out.println("31");
                   break;
            case 8:
                   System.out.println("31");
                   break;
            case 9:
                   System.out.println("30");
                   break;
            case 10:
                    System.out.println("31");
                    break;
            case 11:
                    System.out.println("30");
                    break;
            case 12:
                    System.out.println("31");
                    break;
            default:
                    System.out.println("invalid month");
                    break;

        }    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?