Online Java Compiler By
JavaTpoint.com
import java.util.Date; public class JavaDateSetTimeExample1 { public static void main(String[] args) { Date d=new Date(1997,3,10); long l=1000; d.setTime(l); System.out.println("time after settings : "+d.toString()); } }
Output