Question: Language: Java Complete the reverse() method which takes an array of integers as a parameter and returns a new array such that its elements are
Language: Java
Complete the reverse() method which takes an array of integers as a parameter and returns a new array such that its elements are the same as the parameter array except that they are in reverse order.
For example:
int[] numbers = {2,7,3};
System.out.println(Arrays.toString(reverse(numbers)));
Result: [3, 7, 2]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
