Java Date Time Java Java API
java.time.LocalDateTime
public boolean isAfter(ChronoLocalDateTime<?> other)
If this date-time is after the specified date-time, this method will return true, otherwise will return false.
package com.logicbig.example.localdatetime;import java.time.LocalDateTime;import java.time.Month;public class IsAfterExample { public static void main (String... args) { LocalDateTime d = LocalDateTime.of(2000, Month.JANUARY, 1, 22, 20); boolean b = d.isAfter(LocalDateTime.of(1990, 1, 2, 10, 20)); System.out.println(b); }}
true