LocalDateTime isEqual(ChronoLocalDateTime> other) example
Description
LocalDateTime isEqual(ChronoLocalDateTime<?> other)
checks if this date-time is equal to the specified date-time.
Syntax
isEqual
has the following syntax.
public boolean isEqual(ChronoLocalDateTime<?> other)
Example
The following example shows how to use isEqual
.
import java.time.LocalDateTime;
//from w w w.ja v a2 s . c o m
public class Main {
public static void main(String[] args) {
LocalDateTime a = LocalDateTime.now();
System.out.println(a.isEqual(LocalDateTime.now()));
}
}
The code above generates the following result.