int[] xr = {1, 2, 3, 4, 5}; System.out.print("["); for (int i = xr.length - 1; i >= 0; i--) { System.out.print(xr[i] + ", "); } System.out.println("]"); }