Report potential error : get method on future throw Checked Exception
posted 1 year ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Book : Java OCP 17 Developer Complete Study Guide
Hey everyone, there is nothing about this in the book, and question 4 in review questions seems to have the wrong answer , the book answer is B-C but there is no catch for the future get method so it should be B-C-E?
and someone could please give me the link to a updated version of corrected mistakes?
Hey everyone, there is nothing about this in the book, and question 4 in review questions seems to have the wrong answer , the book answer is B-C but there is no catch for the future get method so it should be B-C-E?
and someone could please give me the link to a updated version of corrected mistakes?
Screenshot_2.png
posted 1 year ago
Well, the code snippet shown doesn't show any enclosing method or class. Depending where this code is inserted, it certainly can compile, or not. We're supposed to assume that when they don't show a full class and method, those parts can be whatever they need to be to make the code compile. The enclosing method could either have a try/catch, not shown, or it could declare that it throws the appropriate Exception(s). We don't know or care. We just assume that whatever issues exist, they are in the code shown, not outside that code.
-
3 -
-
Number of slices to send:Optional 'thank-you' note:
-
-
Rodrigo Morais wrote:but there is no catch for the future get method so it should be B-C-E?
Well, the code snippet shown doesn't show any enclosing method or class. Depending where this code is inserted, it certainly can compile, or not. We're supposed to assume that when they don't show a full class and method, those parts can be whatever they need to be to make the code compile. The enclosing method could either have a try/catch, not shown, or it could declare that it throws the appropriate Exception(s). We don't know or care. We just assume that whatever issues exist, they are in the code shown, not outside that code.
posted 1 year ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
The exam objectives (they call it "topics") noted on the page:
https://education.oracle.com/ouexam-pexam_1z0-830/pexam_1Z0-830
includes text "Assume the following" which sets out to explain the assumptions you should make when answering these exam questions.
I wrote that text some years ago, but the essence is exactly as Mike indicates
https://education.oracle.com/ouexam-pexam_1z0-830/pexam_1Z0-830
includes text "Assume the following" which sets out to explain the assumptions you should make when answering these exam questions.
I wrote that text some years ago, but the essence is exactly as Mike indicates
| roses are red, violets are blue. Some poems rhyme and some are a tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |







