app/src/main/java/com/example/flagfind/GuessFlagActivity.java
public static int RandomizeArray(int[] array) {
        Random rgen = new Random();
        for (int i = 0; i < array.length; i++) {
            int randomPosition = rgen.nextInt(array.length);
            int temp = array[i];
            array[i] = array[randomPosition];
            array[randomPosition] = temp;
        }

        return array[usingThreadLocalClass()];
    }
//    Generating a random number from the array
Generating a random number from the array
Generating a random number from the array
public static int RandomizeArray(int[] array) {
        Random rgen = new Random();
        for (int i = 0; i < array.length; i++) {
            int randomPosition = rgen.nextInt(array.length);
            int temp = array[i];
            array[i] = array[randomPosition];
            array[randomPosition] = temp;
        }
        return array[usingThreadLocalClass()];
    }
public static int RandomizeArray ( int [ ] array ) { Random rgen = new Random ( ) ; for ( int i = 0 ; i < array . length ; i ++ ) { int randomPosition = rgen . nextInt ( array . length ) ; int temp = array [ i ] ; array [ i ] = array [ randomPosition ] ; array [ randomPosition ] = temp ; } return array [ usingThreadLocalClass ( ) ] ; }
Generating a random number from the array
Generating a random number from the array