This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes get the current time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "get the current time" Watch "get the current time" New topic

get the current time

Jackie Wang
Ranch Hand

Joined: Apr 18, 2002
Posts: 315
I would like to print out the current time precise to millisecond to the console. right before the whole program is run and right after the program is run, what should i do?
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937
Depending on what exactly you want to accomplish, there are different options:



... and many other choices and options. Pick whatever suites you best
Jackie Wang
Ranch Hand

Joined: Apr 18, 2002
Posts: 315
thanks for the prompt response eugene, apprecicated htat
It is sorta covered in the JavaRanch Style Guide.
subject: get the current time
Similar Threads
Whizlabs not working
about pathname.
need an application to run at a particular moment in the day
Imorting packages
PrintWriter append