// Per the JavaDoc:
// the value 0 if the argument Date is equal to this Date; a value
// less than 0 if this
// Date is before the Date argument; and a value greater
// than 0 if this Date is after
// the Date argument.
if (startDate.compareTo(endDate) < 0)
{
// before
}
else if (startDate.compareTo(endDate) == 0)
{
// same
}
else if (startDate.compareTo(endDate) > 0)
{
// after
}
else if (startDate.compareTo(firstDate) > 0 && startDate.compareTo(secondDate) < 0)
{
// between
}
Insert your conditions as appropriate.