Hi this is a very simple program explaining of Threads using the runnable interface. I hope this will help in some other way.:)
Threads
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;
}
}
}
}
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.