Question: 2. Write a Java method to determine whether a given year is a leap year using the following definition: A year with 366 days is

2. Write a Java method to determine whether a given year is a leap year using the following definition: A year with 366 days is a leap year. A year is a leap year if it is divisible by four (for example, 1980), except that it is not a leap year if it is divisible by 100 (for example, 1900); however, it is a leap year if it is divisible by 400 (for example, 2000). There were no exceptions before the introduction of the Gregorian calendar on October 15, 1582 (1500 was a leap year). Test this method in a driver program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
