/********************************************************************
* Name:
* NetID:
* Precept:
*
* Description: It's a secret! Shh.
*******************************************************************/
// TO DO: Figure out what this program does. (Stumped? See Exer. 1.4.4.)
public class MysteryArray {
public static void main(String[] args) {
int N = args.length;
int[] a = new int[N];
// store the arguments in an integer array
for (int i = 0; i < N; i++) {
a[i] = Integer.parseInt(args[i]);
}
// What is happening here?
for (int i = 0; i < N/2; i++) {
int temp = a[i];
a[i] = a[N - i - 1];
a[N - i - 1] = temp;
}
// print out the elements
for (int i = 0; i < N; i++) {
System.out.print(a[i] + " ");
}
System.out.println();
}
}