Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

array reverse in java

        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("]");
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #array #reverse #java
ADD COMMENT
Topic
Name
9+7 =