Close

Java Date Time - LocalTime.isAfter() Examples

Java Date Time Java Java API 


Class:

java.time.LocalTime

java.lang.Objectjava.lang.Objectjava.time.LocalTimejava.time.LocalTimejava.time.temporal.TemporalTemporaljava.time.temporal.TemporalAdjusterTemporalAdjusterjava.lang.ComparableComparablejava.io.SerializableSerializableLogicBig

Method:

public boolean isAfter(LocalTime other)

If this LocalTime instance is after the specified LocalTime instance, this method returns ture, otherwise returns false.



Examples


package com.logicbig.example.localtime;

import java.time.LocalTime;

public class IsAfterExample {

public static void main (String... args) {
LocalTime d = LocalTime.of(12, 30, 50);
LocalTime d2 = LocalTime.of(22, 20, 10);
boolean b = d2.isAfter(d);
System.out.println(b);
}
}

Output

true




See Also