Answer:
Non of the given options is correct.... The values stored in the array after the method ChangeArray(items,items[2]) is called are 0, 2, 4, 6, 12
Step-by-step explanation:
See complete java code and output below:
import java.util.Arrays;
import java.util.Scanner;
public class ANot {
public static void main(String[] args) {
int [] newarr = {0, 2, 4, 6,8};
ChangeArray(newarr, newarr[2]);
System.out.println(Arrays.toString(newarr));
}
public static void ChangeArray(int[] passedArray, int value) {
passedArray[value] = 12;
value = 5;
}
}