I go through kathy sierra SCJP 1.5 Chapter 9 (threads) and there it is referred to as:
Please note that the sleep () method can throw a valid InterruptedException (you usually know if this is possible, since the other thread must explicitly interrupt), so you must either throw an exception with a handle or declare it
I just need an example program to find out when this will happen (what can I run on my machine)?
I searched googled but could not find any sample code to test this functionality.
Thanks at Advance
source
share