code: public static Date getLastDayOfMonth(Date date){
          Calendar ca = Calendar.getInstance();
          ca.setTime(date);
          ca.set(Calendar.DAY_OF_MONTH,   1);
          Date firstDate = ca.getTime();
          return addDay(addMonth(firstDate, 1), -1);
      }
docs: 获取月份的最后一天
  @param date
  @return