Boolean haserror = false; 
改为:
boolean haserror = false; 注意大小写。

解决方案 »

  1.   


     if (year<1800)||year>3000{
        haserror = true
     }
    改成 if (year<1800)||year>3000){
        haserror = true;
     }
    还少了分号呢
      

  2.   


     if (year<1800)||year>3000{
        haserror = true
     }
    改成 if (year<1800)||year>3000){
        haserror = true;
     }
    还少了分号呢
      

  3.   


     if (year<1800)||year>3000{
        haserror = true
     }
    改成 if (year<1800)||year>3000){
        haserror = true;
     }
    还少了分号呢