O'Reilly logo

Database Programming with JDBC & Java, Second Edition by George Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Time

Synopsis

Class Name: java.sql.Time

Superclass: java.util.Date

Immediate Subclasses: None

Interfaces Implemented: None

Availability: JDK 1.1

Description

This version of the java.util.Date class maps to a SQL TIME datatype.

Class Summary

public class Time extends java.util.Date {
    static public Time valueOf(String s);
    public Time(int hour, int minute, int second);
    public Time(long time);
    #public int getDate( );
    #public int getDay( );
    #public int getMonth( );
    #public int getYear( );
    #public int setDate(int i);
    #public int setMonth(int i);
    public void setTime(long time);
    #public void setYear(int i);
    public String toString( );
}

Object Constructors

Time( )

public Time(int hour, int minute, intsecond)
public Time(long time)
Description

This constructor creates a new Time object. The first prototype constructs a Time for the hour, minute, and seconds specified. The second constructs one based on the number of seconds since January 1, 1970 12:00:00 GMT.

Object Methods

getDate( ), setDate( ), getDay( ), getMonth( ), setMonth( ), getYear( ), and setYear( )

                        getDate( ), setDate( ), getDay( ), getMonth( ), setMonth( ), getYear( ), and setYear( )public int getDate( )
getDate( ), setDate( ), getDay( ), getMonth( ), setMonth( ), getYear( ), and setYear( )public int getDay( )
getDate( ), setDate( ), getDay( ), getMonth( ), setMonth( ), getYear( ), and setYear( )public int getMonth( )
public int getYear( )
public int setDate(int i)
public int setMonth(int i)
public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required