@@ -0,0 +1,622 @@
+// Reversing an array using Java collections.%0A%0A/*%0Ause the function java.util.Collections.reverse(List list) method. %0AThis method reverses the elements in the specified list. %0AHence, we convert the array into a list first by using java.util.Arrays.asList(array) %0Aand then reverse the list. %0A*/%0A%0Aimport java.util.*;%0A%0Apublic class reversingArray %7B%0A%0A%09/*function reverses the elements of the array*/%0A%09static void reverse(Integer a%5B%5D)%0A%09%7B%0A%09%09Collections.reverse(Arrays.asList(a));%0A%09%09System.out.println(Arrays.asList(a));%0A%09%7D%0A%0A%09public static void main(String%5B%5D args)%0A%09%7B%0A%09%09Integer %5B%5D arr = %7B10, 20, 30, 40, 50%7D;%0A%09%09reverse(arr);%0A%09%7D%0A%7D%0A

Create ReverseArray.java