Java Programs
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment