posted 7 years ago
In question 9, I realise there is already an errata listed as "#9: “implements the ForkJoinTask interface” should say “extends the ForkJoinTask class”".... meaning that the question would read: "Assuming MyTask is an abstract class that extends the ForkJoinTask class, what statements about the following code are true? (Choose all that apply.)"
However, when trying to compile the code example, I realised the code only compiles if MyTask, as well as extending ForkJoinTask, also implements its unimplemented methods, AND had a generic type parameter of <Integer>
Sorry to be pedantic on this, but to save anyone else similar confusion if trying to copy the code and compile to understand the question better, it might be easier if the question (or errata) read:
"Assuming MyTask is an abstract class that extends RecursiveTask<Integer>, what statements about the following code are true? (Choose all that apply.)"
I am posting this so that any (unknown) errors in my understanding can be corrected, and not just to be pedantic! If I am missing something, please let me know.