class Thread1 extends Thread { int i=0; public void run(){ try{ for(i=0; i<10; i++){ System.out.println("Print this 10 times"); System.out.println("Timer: "+(i+1)); Thread.sleep(1000); } } catch(Exception ex){} } } class Thread2 extends Thread { public void run(){ try{ for(int i=0; i<10; i++){ System.out.println("Timer: "+(i+1)); Thread.sleep(1000); } } catch(Exception ex){} } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)