Question: What value will be stored in array1[5] after the execution of the following code? public static void main(String[] args) { int[] array1 (11,23,12,4,67,2}; ma
What value will be stored in array1[5] after the execution of the following code? public static void main(String[] args) { int[] array1 (11,23,12,4,67,2}; ma = for (int i=0; i < array1.length; i++) { methodl (array1, i, 7); } public static void method1(int [] array, int n, int m) { if (array[n] < (m +2 ) ) { } array[n] = array[n] + m;
Step by Step Solution
There are 3 Steps involved in it
1 First lets understand the code The code has an array called array1 with 6 elements The method1 fun... View full answer
Get step-by-step solutions from verified subject matter experts
