class A extends Thread
{
public void run()
{
for(int i=1;i<=5;i++)
{
System.out.println("threadA : "+i);
}
}
}
class B implements Runnable
{
public void run()
{
for(int i=1;i<=5;i++)
{
System.out.println("threadB : "+i);
}
}
}
class MultiCheck
{
public static void main(String args[])
{
A a =new A();
a.start();
B b =new B();
b.start();
}
}
{
public void run()
{
for(int i=1;i<=5;i++)
{
System.out.println("threadA : "+i);
}
}
}
class B implements Runnable
{
public void run()
{
for(int i=1;i<=5;i++)
{
System.out.println("threadB : "+i);
}
}
}
class MultiCheck
{
public static void main(String args[])
{
A a =new A();
a.start();
B b =new B();
b.start();
}
}
0 comments:
Post a Comment