I gave you a few ways to make your example more practical, and the Concurrency tutorials contain numerous examples: Lesson: Concurrency (The Java™ Tutorials > Essential Classes)
Type: Posts; User: KevinWorkman
I gave you a few ways to make your example more practical, and the Concurrency tutorials contain numerous examples: Lesson: Concurrency (The Java™ Tutorials > Essential Classes)
Basically, this is a bad example of Threading. Instead: what happens if each Thread prints out a trillion numbers? What happens if you put a Thread.sleep(100) after printing out each number?
I...