Greg Charles wrote:... where result has type Future. Future.get() throws two checked exceptions and the code snippet doesn't show catching or declaring these exceptions. If we assume the snippet is inside a try-block with an appropriate catch, or is part of a method that declares the exceptions, then it would be fine, but without that assumption, there would be a compile error on that line. That could be clarified a bit.
That assumption is stated in the intro (that if code is missing you can assume it is correct). It's also true throughout the entire book. So this question works as we intended