I'm supposed to make code that shows the next day, and this works except for the months that end in 31. For example, when I enter 3/31/2000, it gives me 4/2/2000 and skips the first day? I'm not sure why?

```
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package lab53;

import java.util.Scanner;
/**
 *
 * @author Owner
 */
public class Lab53 {

    /**
     * @param args the command line arguments
     */

    public static void main(String[] args) {
        // TODO code application logic here
        Scanner keyboardInput = new Scanner(System.in); 
        int year, month, day;                        
        System.out.println("Enter year/month/day");
        year = keyboardInput.nextInt();                
        month = keyboardInput.nextInt();               
        day = keyboardInput.nextInt();                 

        if ((month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12))    
        {              
            day=thirtyOneDaysMonth(day);      
            if(day==1 && month==12){          
                ++year;                       
                month=1;                      
            }
            else if(day==1 && month!=12)      
                ++month;                    
        }

        if ((month==2 || month == 4 || month == 6 || month == 9 || month == 11))     
        {
            day=thirtyDaysMonth(day);              
            if(month==2 && isLeapYear(year))       
            {

                if(day>29)                          
                {
                    ++month;                       
                    day=1;                         
                }
            }
            else if( day>28 && month==2)           
            {
                ++month;                            
                day=1;                             
            }
            else                           
            {

                if(day==1)                       
                {
                    ++month;                            
                    day=1;                             
                }
            }
        }
        System.out.println("The next date is:"+ month + "/" + day + "/" + year);  
    }  

    public static int thirtyOneDaysMonth(int day) 
    {
        if(day==31)                              
            day=1;
        else
            ++day;                              
        return day;
    }

    public static int thirtyDaysMonth(int day) 
    {
        if(day==30)                             
            day=1;
        else
            ++day;                              
        return day;
    }

    public static boolean isLeapYear(int year) 
    {
        if((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0)))
            return true;
        else
            return false;
    }
}

```