public class ParaT 2 0 2 3 extends RecursiveTask { int lo , hi , val; int
Question:
public class ParaT extends RecursiveTask
int lo hi val;
int arr;
static final int CUT;
ParaTint a int l int h int v lol; hih; arra; valv;
protected Integer compute
ifhilo CUT
int ans ;
forint ilo; i hi; i
if arrival ansi;
return ans;
else
ParaT left new ParaTarrlohiloval;
ParaT right new ParaTarrhilohival;
left.fork;
int rightAns right.compute;
int leftAns left.join;
if rightAns return rightAns;
return leftAns;
public static void mainString args throws Exception
int arr ;
final ForkJoinPool fjPool ForkJoinPool.commonPool;
int ans fjPool.invokenew ParaTarrarr.length,;
System.out.printlnans;
How would i determine the number of threads used to execute this code which is apparently and how would i determine the output if it is
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates