0

Hi this is a very simple program explaining of Threads using the runnable interface. I hope this will help in some other way.:)

Edited by Dani: Email removed

public class ThreadTester
{
  public static void main(string args[])
   {
     Runnableex r=new Runnableex();
     Thread t=new Thread(e);
     t.start():
    
    )
}

class Runnableex implements Runnable
{
   int i;

   public void run()
    {
      i=0;
       while(true)
         {
           System.out.println("HELLO"+i++);
            if(i==50)
             {
               break;
             }
         }
    }
}
2
Contributors
2
Replies
5
Views
10 Years
Discussion Span
Last Post by finepax007
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.