to instantiate date, use the following "Date" constructor :-
Date
public Date(long date)
Constructs a Date object using the given milliseconds time value. If the given milliseconds value contains time information, the driver will set the time components to the time in the default time zone (the time zone of the Java virtual machine running the application) that corresponds to zero GMT.
Parameters:
date - milliseconds since January 1, 1970, 00:00:00 GMT not to exceed the milliseconds representation for the year 8099. A negative number indicates the number of milliseconds before January 1, 1970, 00:00:00 GMT.
to print the date use "toString" method :-
toString
public String toString()
Formats a date in the date escape format yyyy-mm-dd.
for example:-
import java.util.Date;
class UsingDate {
public static void main(String[] args) {
long milliSeconds = 23232123123123l;
Date d = new Date(milliSeconds);
System.out.println(d.toString());
}
}
Sample output :-
Wed Mar 14 13:02:03 IST 2706
Jul 17, 2010