LocalTime class provides below APIs to a current time and specific time object and Hour, Minute, Second, add or subtract hours, minutes, seconds, compare and convert String to LocalTime.

static LocalTime now() - This method is used to get the current time from the system clock in the default time-zone.

static LocalTime now(Clock clock)- This method is used to get the current time from the specified clock.

static LocalTime now(ZoneId zone) - This method is used to get the current time from the system clock in the specified time-zone.

int getHour() - This method is used to get the hour of day.

int getMinute() - This method is used to get the minute of hour.

int getSecond() - This method is used to get the second of minute.

int getNano() - This method is used to get the nano of second.

LocalTime plusHours(long hoursToAdd) - This method is used to returns a copy of this LocalTime with the specified number of hours added.

LocalTime plusMinutes(long minutesToAdd) - This method is used to returns a copy of this LocalTime with the specified number of minutes added.

LocalTime plusNanos(long nanosToAdd) - This method is used to returns a copy of this LocalTime with the specified number of nanoseconds added.

LocalTime plusSeconds(long secondstoAdd) - This method is used to returns a copy of this LocalTime with the specified number of seconds added.

LocalTime minusHours(long hoursToSubtract) - This method is used to returns a copy of this LocalTime with the specified number of hours subtracted.

LocalTime minusMinutes(long minutesToSubtract) - This method is used to returns a copy of this LocalTime with the specified number of minutes subtracted.

LocalTime minusNanos(long nanosToSubtract) - This method is used to returns a copy of this LocalTime with the specified number of nanoseconds subtracted.

LocalTime minusSeconds(long secondsToSubtract) - This method is used to returns a copy of this LocalTime with the specified number of seconds subtracted.

int compareTo(LocalTime other) - This method is used to compares this time to another time.

boolean isAfter(LocalTime other) - This method is used to checks if this time is after the specified time.

boolean isBefore(LocalTime other) - This method is used to checks if this time is before the specified time.

static LocalTime parse(CharSequence text) - This method is used to obtains an instance of LocalTime from a text string such as 10:15.

static LocalTime parse(CharSequence text, DateTimeFormatter formatter) - This method is used to obtains an instance of LocalTime from a text string using a specific formatter.

Example: Here is the example using these APIs and methods

package com.javatutsworld.stream;

import java.time.Clock;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;

public class LocalTimePrograme {

    public static void main(String[] args) {

        LocalTime localTime = LocalTime.now();
        System.out.println("Display Current Time :" +localTime);

        System.out.println("Display the hour : " + localTime.getHour());
        System.out.println("Display the minute : " + localTime.getMinute());
        System.out.println("Display the second : " + localTime.getSecond());
        System.out.println("Display the nano second : " + localTime.getNano());
        System.out.println("Display Current Time : " + localTime);
        System.out.println("Display addition of Hours : " + localTime.plusHours(1));
        System.out.println("Display subtraction of Hours : " + localTime.minusHours(1));
        System.out.println("Display addition of Minutes : " + localTime.plusMinutes(20));
        System.out.println("Display subtraction  of Minutes : " + localTime.minusMinutes(20));
        System.out.println("Display addition of Seconds : " + localTime.plusSeconds(20));
        System.out.println("Display subtraction  of Seconds : " + localTime.minusSeconds(20));
        System.out.println("Display addition of Nanos : " + localTime.plusNanos(5000));
        System.out.println("Display subtraction  of Nanos : " + localTime.minusNanos(5000));

        LocalTime localTime1 = LocalTime.of(3, 30, 15);
        System.out.println("Display Current Time :" +localTime1);
        LocalTime localTime2 = LocalTime.of(4, 10, 30);
        LocalTime localTime3 = LocalTime.of(11, 45, 20);
        if (localTime1.compareTo(localTime2) == 0) {
            System.out.println("localTime1 and localTime2 are equal");
        } else {
            System.out.println("localTime1 and localTime2 are not equal");
        }
        if (localTime2.isBefore(localTime3)) {
             System.out.println("localTime2 comes before localTime3");
        }

        if (localTime3.isAfter(localTime1)) {
            System.out.println("localTime3 comes after localTime1");
        }
        LocalTime localTime4 = LocalTime.now(Clock.system(ZoneId.of("Indian/Chagos")));
        System.out.println("Display Current Time :" +localTime4);
        LocalTime isoTime = LocalTime.parse("10:15:30", DateTimeFormatter.ISO_LOCAL_TIME);
        System.out.println("Display isoTime :" +isoTime);
        LocalTime localTime5 = LocalTime.parse("22:45:30", DateTimeFormatter.ofPattern("HH:mm:ss"));
        System.out.println(localTime5);
        LocalTime localTime7 = LocalTime.parse("10:45:30 PM", DateTimeFormatter.ofPattern("hh:mm:ss a"));
        System.out.println(localTime7);
        LocalTime localTime8 = LocalTime.parse("10:45:30 AM", DateTimeFormatter.ofPattern("KK:mm:ss a"));
        System.out.println(localTime8);
    }

}

Output:

Display Current Time :05:31:49.603
Display the hour : 5
Display the minute : 31
Display the second : 49
Display the nano second : 603000000
Display Current Time : 05:31:49.603
Display addition of Hours : 06:31:49.603
Display subtraction of Hours : 04:31:49.603
Display addition of Minutes : 05:51:49.603
Display subtraction  of Minutes : 05:11:49.603
Display addition of Seconds : 05:32:09.603
Display subtraction  of Seconds : 05:31:29.603
Display addition of Nanos : 05:31:49.603005
Display subtraction  of Nanos : 05:31:49.602995
Display Current Time :03:30:15
localTime1 and localTime2 are not equal
localTime2 comes before localTime3
localTime3 comes after localTime1
Display Current Time :17:31:49.769
Display isoTime :10:15:30
22:45:30
22:45:30
10:45:30