Which of the following is a valid method declaration/signature? O public static _s2um(int[] arr) O public static int 2su
Posted: Sat May 14, 2022 4:46 pm
Which of the following is a valid method declaration/signature? O public static _s2um(int[] arr) O public static int 2sum(int[] arr) O public static int_s2um(int[] arr) O public static int_s2um(int[]) QUESTION 2 Consider the following Java code: public static void changeArray(int[] data) { for (int k = data.length - 1; k>0; k--) data[k - 1] = data[k] + data[k - 1]; 3 public static void main(String[] args) { intà d = {1, 6, 12}; changeArray(d); } What are the contents of the array d after the changeArray method execu {1, 6, 12} O {12, 10, 6} {6, 10, 12) O {10, 12, 6} ,