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
...
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.
laura_lu93
Highly Voted 3 years, 5 months agoasdfjhfgjuaDCV
Most Recent 4 months, 3 weeks agoMahdiHamdii
1 year, 7 months agoWilsonKKerll
2 years, 4 months agoTarik2190
3 years, 2 months ago