java用异常处理
publicvoidset(intyear,intmonth,intday)throwsDateFormatException{if(year2500)thrownewDateFormatException(year+",年份不合适,有效年份为-2000~2500。");if(month12)thrownewDateFormatException(month+"月,月份错误");if(dayMyDate.daysOfMonth(year,month))thrownewDateFor