Class java.sql.Time
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.sql.Time

java.lang.Object
   |
   +----java.util.Date
           |
           +----java.sql.Time

public class Time
extends Date

This class is used to represent a subset of the standard java.util.date information. We only deal with hours, minutes, and seconds. This lets us represent SQL TIME information.


Constructor Index

 o Time(int, int, int)
Construct a Time

Method Index

 o toString()
Format a time as hh:mm:ss
 o valueOf(String)
Convert a formatted string to a Time value

Constructors

 o Time
  public Time(int hour,
              int minute,
              int second)
Construct a Time
Parameters:
hour - 0 to 23
minute - 0 to 59
second - 0 to 59

Methods

 o valueOf
  public static Time valueOf(String s)
Convert a formatted string to a Time value
Parameters:
s - time in format "hh:mm:ss"
Returns:
corresponding Time
 o toString
  public String toString()
Format a time as hh:mm:ss
Returns:
a formatted time String
Overrides:
toString in class Date

All Packages  Class Hierarchy  This Package  Previous  Next  Index