Sunday, July 04, 2010

Display current date & time

Buzz It
import java.util.*;
import java.io.*;
class datetime
{
public static void main(String args[])
{
Date d=new Date();
System.out.println(d);
System.out.println();
long msec=d.getTime();
System.out.println("Milliseconds"+msec);
}
}

OUTPUT

0 comments:

Post a Comment