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
...
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
3 months, 1 week agovidhuharu
3 months, 1 week agoasdfjhfgjuaDCV
10 months, 1 week agosteefaand
11 months, 2 weeks agoSamriddji
3 years, 1 month agoTarik2190
3 years, 8 months ago