/* * ThreadTest.java * * Created on 13. srpen 2003, 16:56 */ package org.netbeans.core.output; /** * * @author Tim */ public class ThreadTest { /** Creates a new instance of ThreadTest */ public ThreadTest() { } /** * @param args the command line arguments */ public static void main(String[] args) { Tester t1 = new Tester(1); Tester t2 = new Tester(2); Tester t3 = new Tester(3); Thread th1 = new Thread (t1); Thread th2 = new Thread (t2); Thread th3 = new Thread (t3); th1.start(); th2.start(); th3.start(); } private static class Tester implements Runnable { private int idx; public Tester (int idx) { this.idx = idx; } public void run() { for (int i=0; i < 100; i++) { OutputTabTerm.getStdOut().println("Thread " + idx + " iter " + i + " at " + System.currentTimeMillis()); } } } }