main.java
/*
     * Alexander Papachristu
     * take an input of an array and use a loop to reverse an array
     * in idea to take an array that sorts from least to greatest
     * to make it sorted greatest to least.
     */
Alexander Papachristu
take an input of an array and use a loop to reverse an array
in idea to take an array that sorts from least to greatest
to make it sorted greatest to least.
Alexander Papachristu take an input of an array and use a loop to reverse an array in idea to take an array that sorts from least to greatest to make it sorted greatest to least .
public static int[] reverseArray(int arr[])
    {
        int arrLen = arr.length;
        int revArr[] = new int [arrLen]; 
        int count = 0;
        for(int i = arrLen-1; i>=0; i--) 
        {
            revArr[count] = arr[i]; 
            count++; 
        }
        return revArr; 
    }
public static int [ ] reverseArray ( int arr [ ] ) { int arrLen = arr . length ; int revArr [ ] = new int [ arrLen ] ; int count = 0 ; for ( int i = arrLen - 1 ; i >= 0 ; i -- ) { revArr [ count ] = arr [ i ] ; count ++ ; } return revArr ; }
Alexander Papachristu
 take an input of an array and use a loop to reverse an array
 in idea to take an array that sorts from least to greatest
 to make it sorted greatest to least.
Alexander Papachristu take an input of an array and use a loop to reverse an array in idea to take an array that sorts from least to greatest to make it sorted greatest to least .
//make a parallel array //count down from the highest index of original array to the lowest index //flip positions //keep track of the position of the reversed array //return the reversed array