public class Time
extends java.lang.Object
| Constructor and Description |
|---|
Time()
Initializes a new instance of the Time class.
|
Time(int hour)
Initializes a new instance of the Time class.
|
Time(int hour,
int minute)
Initializes a new instance of the Time class.
|
Time(int hour,
int minute,
int second)
Initializes a new instance of the Time class.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getHour()
Gets a hour.
|
int |
getMinute()
Gets a minute.
|
int |
getSecond()
Gets a second.
|
void |
setHour(int hour)
Sets a hour.
|
void |
setMinute(int minute)
Sets a minute.
|
void |
setSecond(int second)
Sets a second.
|
java.lang.String |
toString()
Converts the value of the current Time object to its equivalent string representation.
|
public Time()
public Time(int hour)
hour - the hourpublic Time(int hour,
int minute)
hour - the hourminute - the minutepublic Time(int hour,
int minute,
int second)
hour - the hourminute - the minutesecond - the secondpublic java.lang.String toString()
toString in class java.lang.Objectpublic int getHour()
public void setHour(int hour)
hour - the new hourpublic int getMinute()
public void setMinute(int minute)
minute - the new minutepublic int getSecond()
public void setSecond(int second)
second - the new second