public class haha{
public static class test{
int year;
test(int year)
{this.year=year;}
public String isrn()
{
if(year%4==0 && year%100==0 ||year%400==0)
return year+"是闰年";
return year+"不是闰年";
}
}
public static void main(String[] args){
test y1=new test(1994);
test y2=new test(2000);
test y3=new test(2004);
System.out.println(y1.isrn());
System.out.println(y2.isrn());
System.out.println(y3.isrn());
}
}
//敲了很久了,呵呵,采纳吧