Candibiotic
News Update :

Ways to create a thread

Thursday, July 16, 2009

class FooRunnable implements Runnable {
public void run() {
for(int x =1; x < 6; x++) {
System.out.println("Runnable running");
}
}
}
public class TestThreads {
public static void main (String [] args) {
FooRunnable r = new FooRunnable();
Thread t = new Thread(r);
t.start();
}
}
Share this Article on :

0 comments:

Post a Comment

 

© Copyright Vinayak Wins 2010 -2011 | Design by Herdiansyah Hamzah | Published by Borneo Templates | Powered by Blogger.com.