A class to store the number of seconds since midnight
Your validation is too strict, as a minute can sometimes have 61 seconds. Limiting it to 60 seconds is what causes computer crashes during leap seconds.

To avoid code duplication, the Time(hour, minute, second) constructor should just do:

public Time(int hour, int minute, int second) {
    this.setHour(hour);
    this.setMinute(minute);
    this.setSecond(second);
}


Your spacing is a bit weird here:


return String .format( "%02d:%02d:%02d", getHour(), getMinute(), getSecond());



It would be more conventional to write:

return String.format("%02d:%02d:%02d", getHour(), getMinute(), getSecond());