ServiceNow Interview Question

Write a function that reverses an array in Java