java.time
I strongly recommend that you use java.time, the modern Java date and time API, for your time work. This should get you started:
int hour = 14;
int minute = 23;
int second = 45;
ZoneId zone = ZoneId.systemDefault();
ZonedDateTime endTime = LocalDate.now(zone)
.plusDays(1)
.atTime(LocalTime.of(hour, minute, second))
.atZone(zone);
ZonedDateTime now = ZonedDateTime.now(zone);
Duration remainingTime = Duration.between(now, endTime);
long hoursRemaining = remainingTime.toHours();
int minutesRemaining = remainingTime.toMinutesPart();
int secondsRemaining = remainingTime.toSecondsPart();
System.out.format("Remaining: %d hours %d minutes %d seconds%n",
hoursRemaining, minutesRemaining, secondsRemaining);
When I ran this snippet in my time zone just now, the output was:
Remaining: 15 hours 55 minutes 27 seconds
Link
Oracle tutorial: Date Time explaining how to use java.time.