how to get current time in java?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • star111792
    New Member
    • Jan 2007
    • 26

    #1

    how to get current time in java?

    hi,
    can anyone plz tell me that which built-in classes of java are used to get current time? what are the methods used? how 2 times can be compared to get the mean time?

    also i want to ask that which method is used to convert milli-seconds to seconds in java?

    thanks
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by star111792
    hi,
    can anyone plz tell me that which built-in classes of java are used to get current time? what are the methods used? how 2 times can be compared to get the mean time?

    also i want to ask that which method is used to convert milli-seconds to seconds in java?

    thanks
    Read all about it in the System class, the GregorianCalend ar class and maybe
    a bit of the Date class. The API documentation is your friend here.

    (I'll remove that preposterous 'urgent tooooooo' from your topic title)

    kind regards,

    Jos

    Comment

    Working...