How to find Leap Year in Java

246 views.

Leap years are years where an extra, or intercalary, day is added to the end of the shortest month, February. The intercalary day, February 29, is commonly referred to as leap day.

Leap years have 366 days instead of the usual 365 days and occur almost every four years.

 

Main.Java

 

Output 1:
Enter an Year ::
2020
Specified year is a leap year

Output 2:
Enter an Year ::
2017
Specified year is not a leap year

Leave a Reply