Example 6 (2)
Class declaration (continued):
public int compareTo (Date that) { // Return –1 if this date is earlier than that, // or 0 if this date is equal to that, // or +1 if this date is later than that. return (this.d < that.d ? -1 : this.d > that.d ? +1 : 0); }