Following a pattern

  • 9
  • Locked
Figure out how the program works. Similar to CountdownRunnable, create a CountUpRunnable thread that displays values ​​in the counting order: from 1 to number.
You can't complete this task, because you're not signed in.
Comments (6)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
msantagiulianab
Level 26 , London, United Kingdom
7 October 2019, 14:50
It took me longer than I expected it would, but working with this kind of logic is very satisfactory.
Andrew
Level 29 , Seattle, United States
8 February 2019, 16:50
Hint: if you copy and paste CountdownRunnable and tweak it to meet the requirements, CountUpRunnable doesn't run long enough before exiting. You need to change the order of something.
robin
Level 23 , Lublin, Poland
29 May 2019, 10:43
Thanks, man! I thought my problem was the reverse - that the thread ran for too long :) But after reading your hint I was able to put my code in the correct order so that the solution got accepted in full.
Andrew
Level 29 , Seattle, United States
29 May 2019, 18:11
Np :)
Ed Maphis
Level 20 , Painesville, United States
13 June 2019, 19:34
Yeah, look at your code and count how often "sleep" executes.
TomL
Level 25 , Prague, Czech Republic
6 February, 21:52
Thanks!