Question 8
Given the incomplete pseudo-code for a fork/join framework application:
And given the missing methods:
process, submit, and splitInHalf
Which three insertions properly complete the pseudo-code? (Choose three.)
Insert process at line Z.
Insert process at line X.
Insert splitInHalf at line X.
Insert process at line Y.
Insert splitInHalf at line Y.
Correct answer: BFG
Explanation:
B: If the size is small enough then process the work.D: If the size is not small enough then slit up the wok in half.G: Submit the two split up pieces of work recursively.Note: Your code should look similar to the following pseudocode: Reference: https://docs.oracle.com/javase/tutorial/essential/concurrency/forkjoin.html
B: If the size is small enough then process the work.
D: If the size is not small enough then slit up the wok in half.
G: Submit the two split up pieces of work recursively.
Note: Your code should look similar to the following pseudocode:
Reference: https://docs.oracle.com/javase/tutorial/essential/concurrency/forkjoin.html