I tried a program where I take an integer array and randomise values in it. but I am not able to understand why but am getting a crazy output which displays special characters and all. what's wrong with my question. Here is my code:
import java.util.Random;
public class Q2d {
    public static void shuffle(int[] arr) {
        int n = arr.length;
        Random random = new Random();
        random.nextInt();
        for (int i = 0; i < n; i++) {
            int change = i + random.nextInt(n - i);
            int temp = arr[i];
            arr[i] = arr[change];
            arr[change] = temp;
        }
    }
    public static void main(String args[]) {
        int[] arr = { 1, 2, 3, 4, 5, 6 };
        shuffle(arr);
        System.out.println(arr);
    }
}
 
     
     
    