generating random numbers in a 5x5 array.

hello. :]

so, I've been trying to figure out for the longest time how to generate numbers in my 5x5 matrices without having the numbers repeat themselves more than once.

Code:

` void Card() {`

salida = "";

salida2 = "";

for (i = 0; i <= 4; i++) {

for (j = 0; j <= 4; j++) {

card1[i][j] = 1 + (int) (Math.random() * 99);

if (card1[i][j] <= 9) {

cadena = "0" + card1[i][j];

}

else {

cadena = "" + card1[i][j];

}

salida = salida + " " + cadena;

if (j == 4) {

salida = salida + "\n";

}

}

}

JOptionPane.showMessageDialog(null, salida, "Card 1",

JOptionPane.INFORMATION_MESSAGE);

}

this what I have for the array. I've had plenty more, but I tried to many different methods to solve my problem, and none of it really helped. your help would be greatly appreciated. :]

oh and I apologize about the spanish variables, but i'm still sure the code still is understandable. :]