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

Ad: Are you a blogger? Join our Blogging forum.





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.