public class Puzzle { public static String[][] grid = new String[4][4]; public static void setupGame(){ int count = 1; for(int i=0;i<4;i++){ for(int j=0;j<4;j++){ grid[i][j] = Integer.toString(count++); } grid[3][3] = "?"; } }
My array is populated by numbers from 1-15 with a "?" as the last element. I was wondering what would be the easiest way to shuffle this so that each time a button is pressed it shuffles each position?