I recently took a quiz and I am confused by the correct answer. Can someone please explain the answer to me? Thank you so much!
You have two arrays named b and c. You call a static method that swaps the value in component k of one array with the value in component k of the other array. This swap method does not mention any variable declared outside the method except its parameters. Which of the following method calls could possibly accomplish this?
Correct answer: swap (c, b, k);
Any help would be appreciated. Thanks!