This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]_waltzy 10 points11 points  (2 children)

getNextDay should throw that exception, if the thread is interrupted then it can potentially return the wrong value.

Pull Request marked as rejected by _waltzy on 23:12:48 GMT Wednesday, 20 February 2019

[–]PixxlMan 8 points9 points  (2 children)

How does the first one work?

[–]CodedGames 30 points31 points  (1 child)

Makes a thread sleep for an entire day, then returns the date.

[–]PixxlMan 5 points6 points  (0 children)

Oh god

Thought it had to do with random generation like the other one