In 2015, daylight saving time in New York, USA, begins on March 8th at 2:00 AM. As a result, 2:00 AM becomes 3:00 AM. Given the code fragment: Which is the result?
Answer is D,
public class Test {
public static void main (String[] args) {
ZoneId zone = ZoneId.of("America/New_York");
ZonedDateTime dt = ZonedDateTime.of(LocalDate.of(2015,3,8), LocalTime.of(1,0), zone);
ZonedDateTime dt2 = dt.plusHours(2);
System.out.print(DateTimeFormatter.ofPattern("H:mm - ").format(dt2));
System.out.print("difference: " + ChronoUnit.HOURS.between(dt,dt2));
}
}
upvoted 3 times
...
This section is not available anymore. Please use the main Exam Page.1z0-809 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
vidhuharu
8 months, 3 weeks agovidhuharu
8 months, 3 weeks agoasdfjhfgjuaDCV
1 year, 3 months agosteefaand
1 year, 4 months agoSamriddji
3 years, 7 months agoTarik2190
4 years, 1 month ago