How to make a forkjoinpool to compare two Arrays in Java?

37 Views Asked by At

So i'm having a problem because i neet to make a recursive void to get the positions of the numbers that are the same but i d'ont know how to make it recursively. i wass wondering if it's possible to make a forjoinpool without being a recursively void.

 
     public static int index(byte data [],int t, int start) {

           ArrayList <Integer> lista = new ArrayList();

           if(start == data.length) {
               System.out.println(data.length);
               return 0;
           }

           if(data[start]==t) {
               lista.add(start);
               return start;
           }
           return index(data,t,start+1);
       }

i need this void but instead of just searching for one number instead search in another array int t it has to be a byte target[]

0

There are 0 best solutions below