Consider the following method, mystery3: What are the values of the elements in the array numbers after

Question:

Consider the following method, mystery3:

public static void mystery3 (int [] data, int x, int y) { data[data[x]] = data[y]; data[y] X; }

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

int[] numbers = {3, 7, 1, 0, 25, 4, 18, −1, 5};

mystery3(numbers, 3, 1);

mystery3(numbers, 5, 6);

mystery3(numbers, 8, 4);

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

Step by Step Answer:

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