Java examples for java.time:ZonedDateTime
get Newest ZonedDateTime
//package com.java2s; import java.time.ZonedDateTime; public class Main { public static ZonedDateTime getNewest(final ZonedDateTime first, final ZonedDateTime second) { if (first == null) { return second; } else if (second == null || first.isAfter(second)) { return first; }/* w w w . j a v a 2 s .com*/ return second; } }