public static boolean compareDates(final Date firstDate,final Date secondDate){
  return firstDate == null || secondDate == null ? true : firstDate.before(secondDate) ? false : true;
}

public static boolean compareDates ( final Date firstDate , final Date secondDate ) { return firstDate == null || secondDate == null ? true : firstDate . before ( secondDate ) ? false : true ; }
this method will return true < br / > if any of the given date is null or firstdate comes before the seconddate or both dates are same < br / > will return false < br / > if firstdate comes after seconddate
