*6.16(一年的天数)使用下面的方法头编写一个方法,返回一年的天数:
public static int numberOfDaysInAYear(int year)
编写一个测试程序,显示从2000年到2020年间每年的天数
*6.16(Number of days in a year) Write a method that returns the number of days in a year using the following header:
public static int numberOfDaysInAYear(int year)
Write a test program that displays the number of days in the years between 2020 and 2034.
下面是参考答案代码:
public class NumberOfDaysInAYearQuestion16