Write a method in pseudocode or Java called move that accepts a boolean[], integer value, and a boolean value. Your method should return a copy of the original array except each element has been moved to the left as determined by the integer parameter.

Respuesta :

Writing a code in JAVA computational language it is possible to write a code using the boolean, so it is possible to have the code as:

Writing the code in latex:

import java.util.Arrays;

public class BooleanReverse {

public static void main(String[] args) {

boolean arr[] = {true, false, true, true, false, false, false, true, false, false, true, true};

System.out.println("Input boolean array is "+Arrays.toString(arr));

reverseArray(arr);

System.out.println("Output boolean array is "+Arrays.toString(arr));

}

public static boolean[] reverseArray(boolean arr[]){

int i = 0, j = arr.length - 1;

boolean tmp;

while (j > i) {

tmp = arr[j];

arr[j] = arr[i];

arr[i] = tmp;

j--;

i++;

}

return arr;

}

}

See more about JAVA at brainly.com/question/12975450

#SPJ4

Ver imagen lhmarianateixeira