public void run() { String s = ""; for (int i = 0; i < 1001; i++) { // Delay s += "" + i; if (i == 1000) { s = " has finished the race!"; System.out.println(getName() + s); isFinished = true; } } }