public class Clock24 extends Clock
Clock24
is a Clock
that provides its hour in
24-hour format (0 to 23) instead of 12-hour format. The purpose is to show
how an extended class may override a method of the superclass.
Java Source Code for this class:
http://www.cs.colorado.edu/~main/edu/colorado/simulations/Clock24.java
Clock
Constructor and Description |
---|
Clock24() |
Modifier and Type | Method and Description |
---|---|
int |
getHour()
Get the current hour of this
Clock24 , in 24-hour format. |