Header Ads

  • Breaking Now

    Explain the usage of java.util.Date and more classes and APIs for date handling in Java?

    The class java.util.Date
    -Represents a point in time.
    -Corresponds to the number of milliseconds since the start of the Unix epoch on January 1, 1970, 00:00:00 GMT.
    -This class depends on System.currentTimeMillis() to obtain the current point in time,which actually returns a long value and its accuracy and precision is determined by the implementation of System and underlying OS.
    Apart from this class there are several other classes like GregorianCalendar,SimpleTimeZone,SimpleDateFormat,DateFormatSymbols,java.sql.Date,java.sql.Time ,java.sql.Timestamp which are used for handling date and time related problems.In the table shown below a very brief purposes of these classes have been summarized:

    Post Top Ad

    Post Bottom Ad