/**
 * A printer is a thread printing its name ITERATION times.
 *
 * @version     1.1    January 24, 2000
 * @author      Franck van Breugel
 */
public class Printer extends Thread {

    /**
     * Constructs a thread with the specied name.
     * @param name Name of the thread.
     */
    public Printer(String name) {
        super(name);
    }

    /** The number of times the name of the thread is printed. */
    private static final int ITERATION = 1000;

    /** Prints the name of the thread ITERATION times. */
    public void run() {
        for (int i = 0; i < ITERATION; i++) {
            System.out.print(getName());
        }
    }
}