LocalTime now = LocalTime.now(); LocalTime miHora = LocalTime.of(10, 30); LocalTime otraHora = LocalTime.parse("10:34"); System.out.println(now); System.out.println(miHora); System.out.println(otraHora); // Obtener información de las horas System.out.println(now.getHour()); System.out.println(now.getMinute()); System.out.println(now.getSecond()); System.out.println(now.getNano()); // Formatear horas System.out.println(now.format(DateTimeFormatter.ofPattern("HH:mm:ss"))); // Modificar horas now = now.plusHours(1); now = now.plusMinutes(2); now = now.plusSeconds(40); now = now.plus(1, ChronoUnit.MINUTES); System.out.println(now);