The new
keyword is needed when throwing an exception
throw new InterruptedException("...");
but sleep
will throw its own InterruptedException
so there's no need to throw the exception explicitly
try {
Thread.sleep (4000);
} catch (InterruptedException e) {
...
}