class A extends Thread
{
public void run()
{
for(int i=0;i<5;i++)
{
System.out.println("From Thread A :"+i);
}
}
}
class B extends Thread
{
public void run()
{
for(int i=0;i<5;i++)
{
System.out.println("From Thread B :"+i);
}
}
}
class C extends Thread
{
public void run()
{
for(int i=0;i<5;i++)
{
System.out.println("From Thread C :"+i);
}
}
}
public class ThreadTest {
public static void main(String args[])
{
new A().start();
new B().start();
new C().start();
}
}
No comments:
Post a Comment