A leap year is exactly divisible by 4 except for century years (years ending with 00). The century year is a leap year only if it is perfectly divisible by 400.

Java Program to Check a Leap Year
public class LeapYear {

    public static void main(String[] args) {

        int year = 1900;
        boolean leap = false;

        if(year % 4 == 0)
        {
            if( year % 100 == 0)
            {
                // year is divisible by 400, hence the year is a leap year
                if ( year % 400 == 0)
                    leap = true;
                else
                    leap = false;
            }
            else
                leap = true;
        }
        else
            leap = false;

        if(leap)
            System.out.println(year + " is a leap year.");
        else
            System.out.println(year + " is not a leap year.");
    }
}

When you run the program, the yield will be: 
1900 isn't a jump year. 

When you change the estimation of year to 2012, the yield will be: 
2012 is a jump year. 

In the above program, given year 1900 is put away in the variable year. 

Since 1900 is divisble by 4 and is additionally a century year (finishing with 00), it has be divisble by 400 for a jump year. Since it's not distinct by 400, 1900 isn't a jump year. 

However, on the off chance that we change year to 2000, it is detachable by 4, is a century year and is additionally separable by 400. Along these lines, 2000 is a jump year. 

In like manner, If we change year to 2012, it is separable by 4 and isn't a century year, so 2012 a jump year. We don't have to check if 2012 is separable by 400 or not.

Java Program to Display Fibonacci Series