Online Java Compiler By
JavaTpoint.com
import java.util.Date; public class JavaDateAfterExample2 { public static void main(String[] args) { Date d=new Date(1997,3,10); Date d2=new Date(2018,9,21); System.out.println("Date 'd' is after Date 'd2' : "+d.after(d2)); } }
Output