int [] arr = new int [] {1, 2, 3, 4, 5}; for (int i = arr.length-1; i >= 0; i--) { System.out.print(arr[i] + " "); } //output: 5 4 3 2 1