Sunday, January 12, 2014

Example of multiple task by multiple Thread using Runnable interface

class Thread11 implements Runnable
{
public void run()
{
System.out.println("Mahesh Babariya");
}
public static void main(String surat[])
{
Thread t1=new Thread(new Thread11());
Thread t2=new Thread(new Thread11());
t1.start();
t2.start();
}
}

Output :

No comments:

Post a Comment