Online Java Compiler By
JavaTpoint.com
import java.util.Date; public class JavaDateGetTimeExample1 { public static void main(String[] args) { Date d=new Date(1997,3,10); System.out.println("Current number of milliseconds science January 1, 1970, 00:00:00 GTM : "+d.getTime()); } }
Output