Simple Threads Example
public class Clock extends Thread {
public Clock(String strSound){
this.strSound = strSound;
System.out.println (strSound);
try{ this.sleep(1000);}// DOES NOT BLOCK
catch (InterruptedException e){}
public static void main (String arg[]){
Clock c1 = new Clock("Tick");
Clock c2 = new Clock("Tock");
Note use of infinite loop
This code can run while other