<<< Creating a thread | Index | IOThread -- thread class example >>> |
public class Main { public static void main(String[] args) { Thread ct = Thread.currentThread(); System.out.println( ct.getName() + " started" ); // create the IO thread Thread worker = new IOThread(); // start the IO thread worker.start(); System.out.println( ct.getName() + " started " + worker.getName() ); System.out.println( ct.getName() + " finished" ); } }//class Main
<<< Creating a thread | Index | IOThread -- thread class example >>> |