This code creates a Date object with the specified number of milliseconds since the epoch (January 1, 1970, 00:00:00 GMT) using the Date constructor that takes a long value as an argument. The Date object is then printed to the console using System.out.println(). The output will be a human-readable date and time string in the default time zone, corresponding to the specified number of milliseconds since the epoch.
import java.util.*; public class Date_Constructor { public static void main(String[] args) { Date date = new Date(732153600000L); System.out.println("Date : " + date); } }
Date : Mon Mar 15 05:30:00 IST 1993
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions