i'm reviewing for a test and this is about the only thing that's bothering me.
heres the code:
heres the code:
Code:
//Write a code segment that reverses the elements in the integer array, a.
int temp;
for (int i=0;i<a.length/2;i++)
temp = a[i];
a[i] = a[a.length - i - 1];
a[a.length - i - 1] = temp;