Oracle
1Z0-809 · Question #42
1Z0-809 Question #42: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #42. The question stem and answer options stay visible for context.
Question
Given the code fragment:
ZonedDateTime departure = ZonedDateTime.of(2015, 1, 15, 3, 0, 0, 0,
ZoneId.of("UTC-5"));
ZonedDateTime arrive = ZonedDateTime.of(2015, 1, 15, 9, 0, 0, 0,
ZoneId.of("UTC-5"));
long hrs = ChronoUnit.HOURS.between(depart, arrive); //line nl
System.out.println("Travel time is" + hrs + "hours");
What is the result?
Options
- ATravel time is 4 hours
- BTravel time is 6 hours
- CTravel time is 8 hours
- DAn exception is thrown at line n1.
Unlock 1Z0-809 to see the answer
You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.