public static void mystery(int[] list) {
for (int i = 0; i < list.length / 2; i++) {
int j = list.length - 1 - i;
int temp = list[i];
list[i] = list[j];
list[j] = temp;
}
}
public static void main(String[] args) {
int[] array = {1, 3, 5, 7, 9};
mystery(array);
for (int val : array) {
System.out.print(val + " ");
}
}