setHour public void setHour(int hour) setHour - Sets the hour of the watch forward by a number of hours. Note: if the ho
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
setHour public void setHour(int hour) setHour - Sets the hour of the watch forward by a number of hours. Note: if the ho
setHour public void setHour(int hour) setHour - Sets the hour of the watch forward by a number of hours. Note: if the hour of the watch is greater than 12, it should roll back over to 1 and only display time [1,12] (This is a 12- hour timepiece, not 24-hour military watch). e.g. if the current hour is 08:00:00 and you call setHour(6), it should now read 02:00:00 Parameters: hour - the integer value of how many hours to advance the watch Throws: java.lang. IllegalArgumentException - if the input hour is less than o