Checks if the first parameter is after the second parameter in time.
import java.util.Date;
class Main{
/**
* Checks if the first parameter is after the second parameter in time.
* @param date1 The first date to compare.
* @param date2 The second date to compare.
* @return True if the first date in time is after the second, if not false.
*/
public static boolean isAfter(Date date1, Date date2) {
if (date1.compareTo(date2)>0) {
return true;
}
return false;
}
}
Related examples in the same category