nerdexam
Oracle

1Z0-804 · Question #107

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?

The correct answer is C. Insert process at line X. E. Insert splitInHalf at line Y. G. Insert submit at line Z. C: If data is small enough then process it. Line X E: If data is not small enough then split it half. Line Y G: After the data has been split (line Y) then recursively submit the splitted data (Line z).

Concurrency

Question

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?

Exhibit

1Z0-804 question #107 exhibit

Options

  • AInsert submit at line X.
  • BInsert splitInHalf at line X.
  • CInsert process at line X.
  • DInsert process at line Y.
  • EInsert splitInHalf at line Y.
  • FInsert process at line Z.
  • GInsert submit at line Z.

How the community answered

(46 responses)
  • A
    2% (1)
  • B
    4% (2)
  • C
    85% (39)
  • D
    9% (4)

Explanation

C: If data is small enough then process it. Line X E: If data is not small enough then split it half. Line Y G: After the data has been split (line Y) then recursively submit the splitted data (Line z).

Topics

#fork/join framework#ForkJoinPool#task splitting#RecursiveAction

Community Discussion

No community discussion yet for this question.

Full 1Z0-804 Practice