Card 36 / 42: What does sleep(long millis) in Thread class do?
A)
causes the thread, which sleep is invoked on, to sleep (temporarily cease execution) for the specified number of milliseconds
B)
causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds
C)
causes the main() thread to sleep for the specified number of milliseconds
D)
causes the currently executing thread to wait(temporarily cease execution) for the specified number of milliseconds then brings it back to run.
Answer:
B) causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |