public class BingoWood {
public static void main(String[] args) {
bingoCard();
}
public static void bingoCard(){
Random ran = new Random();
System.out.println("B I N G O");
int[][] board = new int [5][5];
for(int i = 0; i < board.length; i++){
for(int j = 0; j < board.length; j++){
board[0][j] = ran.nextInt(15) + 1;
board[1][j] = ran.nextInt(15) + 16;
board[2][j] = ran.nextInt(15) + 31;
board[2][2] = 0;
board[3][j] = ran.nextInt(15) + 46;
board[4][j] = ran.nextInt(15) + 61;
System.out.printf("%-3s",board[j][i]);
}
System.out.println();
}
}
} enter image description here I am creating a bingo card using the above method, but I am having trouble getting the columns to have no repeating numbers. Is it the way I have coded the multidimensional array too broad for logic? Or does a way exist where I can keep the same chunk of code for the array and apply logic to exclude repeated numbers? New to coding / Java, any help is appreciated.