private boolean judge(String str){ int year = 0; try{ year = Integer.valueOf(str).intValue(); }catch(NumberFormatException e){ e.printStackTrace(); } if(year%4==0 && year%100!=0){ return true; } else{ return false; } }
时间: 2024-12-21 00:05:48
private boolean judge(String str){ int year = 0; try{ year = Integer.valueOf(str).intValue(); }catch(NumberFormatException e){ e.printStackTrace(); } if(year%4==0 && year%100!=0){ return true; } else{ return false; } }