I was going through some blogs, and I came across this interesting code.

 
At first, I ignored it. Then later I thought, what might be the intention behind writing it.

public void run()
{
try
{
Thread.sleep(10);
}
catch (InterruptedException e1)
{
e1.printStackTrace();
}
}

This thread sleeps for 10 milliseconds, before it dies. Now why will anybody write such a code?

Any idea guys ???

Credit: It was some blog, of course. But I forgot.



No Responses Yet to “Sleeping Beauty”  

  1. No Comments Yet

Leave a Reply