Consider the following method, mystery: What are the values of the elements in array a1 after the

Question:

Consider the following method, mystery:

public static void mystery (int [] a, int [] b) { for (int i = 0; i < a.length; i++) { a[i] += b[b.length - 1 i);

What are the values of the elements in array a1 after the following code executes?

int[] a1 = {1, 3, 5, 7, 9};

int[] a2 = {1, 4, 9, 16, 25};

mystery(a1, a2);

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: