I'm just starting out in programming. I am trying to develop a program that collects any amount of integer numbers and reverses the order in which they were entered. Say 1 6 8 9 4 9 becomes 9 4 9 8 6 1 This is what I did:
System.out.println("Enter ten numbers:");
int[] n = new int[10];
for (int i =0; i<n.length; i++)
n[i] = input.nextInt();
for(int i =0; i<n.length-1; i++)
for (int j= n.length-1; j>0; j--){
int temp = n[i];
n[i] = n[j];
n[j] = ;
}
}