There is no output for this code. I don't know why. It seems like it should work. Can someone please let me know what they think i need to change. Here is the problem.
https://students.ga.desire2learn.com...eeResponse.pdf
import java.util.Random; //imports the Random java class public class PermutationGenerator { /*This method iterates the nextPermutation() method 10 times *to produce 10 differernt arrays of size 10 with integers *1 to 10 inclusive*/ public void PGenerator() { PermutationGenerator a = new PermutationGenerator(); for (int i=0;i<10;i++) a.nextPermutation();//This loop repeats the nextPermutation method 10 times to produce 10 different arrays } /*This method returns an array of 10 integers from *1 to 10 inclusive in a random order by creating a *new array from permutations of a base array*/ public int[] nextPermutation() { Random rand = new Random();//Creates the random generator int baseSize = 0;//Initializes the base counter as 0 int[] base = new int[10];//Initializes the base array for (int i = 0; i<10; i++){ //This loop fills up the base array with integers 1 to 10 inclusive base[i] = i + 1; baseSize++;//Increases the counter for base size System.out.println (base); } int[] mutation = new int[10];//Initializes the mutation array for (int i = 0; i<10; i++){ int a = rand.nextInt(baseSize); //Picks a random index between 0 and the length of the base array mutation[i] = base[a]; //Sets the ith index of the result mutation array to the value at a in the base for (int j = a; j<baseSize - 1; j++){ base[j] = base[j + 1];//This loop deletes the value at index a in the base array to prevent it from being chosen again System.out.println (base); } baseSize--;//Decreases the length of the base array } return mutation; } public static void main(String[] args) { } } public static void main(String[] args) { }