Sleeping Beauty
14Jul08
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.
Filed under: Java | Leave a Comment
Tags: Java, sleeping beauty, Thread
No Responses Yet to “Sleeping Beauty”