Java LocalDateTime Duration fundamental
Advertisements Here’s my code: // check if the time within 10 mins if (Duration.between(listOfAppointment.get(Integer.parseInt(indicator) – 1).getDateTimeOfAppointment(), LocalDateTime.now()).compareTo(Duration.ofMinutes(10)) < 0) { try { listOfAppointment.get(Integer.parseInt(indicator) – 1).setCheckIn(true); System.out.println("The check-in has been done! Let’s see your PT!"); break; } catch (Exception e) { System.out.println("Invalid input, please try again!"); indicator = console.nextLine(); } } else { System.out.println("It seems that… Read More Java LocalDateTime Duration fundamental