Leap Year: Leap Year is the year contains an extra day. In the leap year, February month contains 29 days since normally February month has 28 days. The year which is completely divided by 4 that is the leap year.
This section determines whether the given year is leap year or not using the isLeapYear(year) method of the Calendar class.
This method returns a boolean value true, if the year is leap year otherwise it returns the boolean value false.
This program checks each and every entries properly.
Here is the code of the program:
Liked it! Share this Tutorial
Ask Questions? Discuss: Determining If a Year is a Leap Year in Java
Post your Comment