Java Clock Class Methods

Java Clock class has the following built-in methods.

Method Description
equals() It is used to check whether this Clock object and the given Object are equal or not.
fixed() It is used to represent this Clock as a fixed instant (i.e. it returns the same instant that are similar to this Clock).
getZone() It is used to get the time zone that is linked with this Clock.
hashCode() It is used to get the hash code value of this Clock.
instant() It is used to get the current instant that is used with this Clock.
millis() It is used to represent the current instant in milliseconds of this Clock.
offset() It is used to generate a new Clock from the given base clock with added the given Duration.
system() It is used to select system clock that is available in the given zone.
systemDefaultZone() It is used to get the current instant that uses the system clock in the default zone.
systemUTC() is used to get a Clock that implements the suitable system clock in the UTC Zone.
tick() It is used to get a Clock that returns the current instant tick.
tickMinutes() It is used to get a Clock that returns the current instant that uses suitable system clock in the give zone (zo) to tick in whole minutes.
tickSeconds() It is used to get a Clock that returns the current instant that uses suitable system clock in the given zone (zo) to tick in whole seconds.
withZone() It is used to clone this Clock object but with different zone.


Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.