exam questions

Exam 1z0-809 All Questions

View all questions & answers for the 1z0-809 exam

Exam 1z0-809 topic 1 question 118 discussion

Actual exam question from Oracle's 1z0-809
Question #: 118
Topic #: 1
[All 1z0-809 Questions]

Given the code fragment:

What is the result?

  • A. A compilation error occurs at line n1.
  • B. Logged out at: 2015-01-12T21:58:19.880Z
  • C. Can't logout
  • D. Logged out at: 2015-01-12T21:58:00Z
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
laura_lu93
Highly Voted 3 years, 5 months ago
Answer is C tested. after truncatedTo are called, LoginTime and LogoutTime are the same.
upvoted 8 times
...
asdfjhfgjuaDCV
Most Recent 4 months, 3 weeks ago
C is the answer
upvoted 1 times
...
MahdiHamdii
1 year, 7 months ago
Selected Answer: C
Answer is C tested.
upvoted 1 times
...
WilsonKKerll
2 years, 4 months ago
Answer is C.
upvoted 2 times
...
Tarik2190
3 years, 2 months ago
Answer is C, public class Test { public static void main (String[] args) throws InterruptedException { Instant loginTime = Instant.now(); Thread.sleep(1000); Instant logoutTime = Instant.now(); loginTime = loginTime.truncatedTo(ChronoUnit.MINUTES); logoutTime = logoutTime.truncatedTo(ChronoUnit.MINUTES); if (logoutTime.isAfter(loginTime)) System.out.println("Logged out at: " + logoutTime); else System.out.println("Can't logout"); } }
upvoted 4 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago