27 June 2013

Simple Thread Example in Java

This is a simple Thread example. I am utilizing Runnable interface to create Threads. In the main method it generates 5 threads, and start them. Each thread print out the simpleName set in the main method. Running this code, you will get basic idea of how threads are working.