```java
public class LeapYear {
public static void main(String[] args) {
for (int i = 1000; i <= 2000; i++) {
if (isLeapYear(i)) {
System.out.println(i + "是闰年");
}
}
}
public static boolean isLeapYear(int year) {
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
return true;
} else {
return false;
}
}
}
```
public class LeapYear {
public static void main(String[] args) {
for (int i = 1000; i <= 2000; i++) {
if (isLeapYear(i)) {
System.out.println(i + "是闰年");
}
}
}
public static boolean isLeapYear(int year) {
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
return true;
} else {
return false;
}
}
}
```
上一篇:提出几个对党的支委会的意见与建议
下一篇:商場感想