Students at the secret CodeGym center were given a task to assess their skills: write a countdown from 10 to 0 to determine how much time is left before the end of this test. Cool, huh? To create a delay, you need to use Thread.sleep(100), and wrap the sleep call in a try-catch block. Time's up!
Countdown
- 3
Locked
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Seferi
14 July 2020, 09:41
Why does Thread.sleep() causes an Exception?
And why does it execute fine if we catch it ?
+1
Hannah Software Architect
4 August 2020, 08:15
Wanna know too, if someone could explain please.
0