Given the change() method below: public static void change(char[] array, int index1, int index2) { char temp
Fantastic news! We've Found the answer you've been seeking!
Question:
Given the change() method below:
public static void change(char[] array, int index1, int index2) {
char temp = array[index2];
array[index1] = array[index2];
array[index2] = temp;
}
What would be the contents of array after executing the following code segment?
char[] array = {'H', 'K', 'U', 'S', 'T'};
change(array, 1, 3);
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date: