posted 2 years ago
I imagine that the code segment/snippet presented, starting from the bottom of page 855 through the top of page 856 of the study guide, is part of some larger code that either declares or handles the InterruptedException thrown by the awaitTremination() method. However, wouldn't it be better if the code snippet explicitly shows that it itself, at least, handles this exception in a catch block, even if some larger encompassing code isn't provided to show that the exception is declared?