import java.util.Date;
class New
{
public static void main(String args[])
{
Date d = new Date();
System.out.println("Time in millisecond is from 1 jun 1970 " + d.getTime());
System.out.println("Current Date and Time is : "+d.toString());
}
}
output:
e:\java_programs>java New
Time in millisecond is 1377282070857
Current Date and Time is : Fri Aug 23 23:51:10 IST 2013
class New
{
public static void main(String args[])
{
Date d = new Date();
System.out.println("Time in millisecond is from 1 jun 1970 " + d.getTime());
System.out.println("Current Date and Time is : "+d.toString());
}
}
output:
e:\java_programs>java New
Time in millisecond is 1377282070857
Current Date and Time is : Fri Aug 23 23:51:10 IST 2013
No comments:
Post a Comment