Can reverse it the input with less code than these? Java
Searching on the site maybe this can help.

for(int i = 0; i &lt; validData.length / 2; i++) {
  int temp = validData[i];
  validData[i] = validData[validData.length - i - 1];
  validData[validData.length - i - 1] = temp;
}


To reverse an int array