This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have all my watches synchronized using it. Who needs days, months and years anyways?
Joined: Jan 31, 2006
is this giving me the current time in milliseconds? im trying to get something like 11:20pm. there are 3,600,000 milliseconds in an hour and right now my clock says 11:20 which would mean this code should be giving me 40,000,000 but it is giving me a number much bigger then that.
You get a Date object that represents the current date and time simply by creating a Date object using the no-args constructor. You use a class like java.text.SimpleDateFormat to format it into a String anyway you like.