← Quiz: Date and Time in Java: all 10 questions
Quiz: Date and Time in Java · Question 10 of 10
Which is true about Instant?
Which is true about Instant?
- A.It stores a date without a time
- B.It changes value when you print it in a different zone
- C.It is mutable
- D.It is one exact point on the UTC timeline, good for logs and database timestamps
Answer & explanation
Correct answer: It is one exact point on the UTC timeline, good for logs and database timestamps
An Instant is zone-independent; convert it to a ZonedDateTime only for display.
Can you get the rest right without peeking?
Take the timed Quiz: Date and Time in Java quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →