This method returns the hour-of-day field from this LocalTime instance.
Examples
package com.logicbig.example.localtime;
import java.time.LocalTime;
public class GetHourExample { public static void main (String... args) { LocalTime d = LocalTime.of(14, 30, 40, 3000); int hour = d.getHour(); System.out.println(hour); } }