reverse matrix java code example
Example 1: how to reverse a list in java
List<String> stringList = Arrays.asList("A", "B", "C");
Collections.reverse(stringList);
assertThat(stringList).containsExactly("C", "B", "A");
Example 2: reverse array java
// reverse array
for(int i=intArray.length-1;i>=0;i--)
System.out.print(intArray[i] + " ");