Converting Instant to ZonedDateTime in Java

Report a typo

Hey there! This problem might be a bit unpredictable, but give it a go and let us know how you do!
Given an 'Instant' object and a 'String' representation of a timezone (i.e., 'America/New_York'), which of the following is the correct way to convert this 'Instant' to a 'ZonedDateTime' or 'OffsetDateTime' object based on the provided timezone?
Select one option from the list

Create a free account to access the full topic