🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.It stores a date without a time
  2. B.It changes value when you print it in a different zone
  3. C.It is mutable
  4. 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 →