Online Java Compiler By
JavaTpoint.com
import java.sql.Timestamp; public class JavaTimestampAfterExample1 { public static void main(String[] args) { Timestamp ts1 = Timestamp.valueOf("2018-09-01 09:01:15"); Timestamp ts2 = Timestamp.valueOf("2018-09-01 09:01:16"); //returns Boolean value true if this ts1 comes later than given ts2 System.out.println("Boolean value returned : "+ts1.after(ts2)); } }
Output