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.
Calendar.isLeapYear(year):
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:
import java.util.*;
|
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Determining If a Year is a Leap Year in Java
Post your Comment