关于方法构造的小问题
public class Test{public static void main(String[] args){
int year1 = 2000;
int year2 = 2015;
int month1 = 5;
int month2 = 4;
int day1 = 15;
int day2 = 22;
public int LeapYear(int year){
if(year % 4 ==0 % year % 100 != 0 || year % 400 ==0){
year = 366;
}else{
year = 365;
}
return year;
}
........
我想问的是:
这种写法为什么是错的??我觉着没问题啊 ,Eclipse 显示有错误,希望好心人解惑,感激不尽!