/** * A thread that prints its name 1000 times. * * @author Franck van Breugel */ public class Printer extends Thread { /** * Initialize this printer with the specified name. * * @param name the name of this printer. */ public Printer(String name) { super(name); } /** * Prints its name 1000 times. */ public void run() { final int NUMBER = 1000; for (int i = 0; i < NUMBER; i++) { System.out.print(this.getName()); } } }