Answer:
Step-by-step explanation:
Here is the code for the method:
```
public static int numberOfDaysInAYear(int year) {
if (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)) {
return 366;
} else {
return 365;
}
}
```
Here is the code for the test program:
```
public class FirstName_YourID_DaysInYear {
public static void main(String[] args) {
for (int year = 2000; year <= 2020; year++) {
System.out.println(year + " has " + numberOfDaysInAYear(year) + " days.");
}
}
}
```
Make sure to replace "FirstName" and "YourID" with your own first name and ID number.