package com.javastoreroom.in;
import java.sql.Timestamp;
import java.util.Date;
public class TimeStamp {
public static void main(String[] args) {
/**
* @see currentTimeMillis() Returns the current time in milliseconds.
*/
Date date=new Timestamp(System.currentTimeMillis());
System.out.println(date);
}
}
Output ...

No comments:
Post a Comment