Sunday, January 19, 2014

Program of interrupting thread that behaves normally......

class InterRupt4 extends Thread
{
public void run()
{
for(int i=1;i<=5;i++)
System.out.println("MaHi");
}
public static void main(String surat[])
{
InterRupt4 t1=new InterRupt4();
t1.start();
t1.interrupt();
}
}

Output:

No comments:

Post a Comment