Can any1 tell me what's wrong with my code? I'm getting an incorrect output. Cheers
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String[] days={"SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"};
int month = in.nextInt();
int day = in.nextInt();
int year = in.nextInt();
Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, year);
c.set(Calendar.MONTH, month);
c.set(Calendar.DAY_OF_MONTH, day);
int day_of_week = c.get(Calendar.DAY_OF_WEEK)-1;
System.out.println(days[day_of_week]);
}