Olá, boa tarde.
Gostaria de saber como faço para que os números n se repitam consecutivamente neste código. pois eles podem ate se repetir, mas n em seguida.
double n = 1 + Math.random() * (11 - 1);
int valor = (int) n;
String f1 = "<html>xxxxxxxxxxx</html>";
String f2 = "<html>xxxxxxxxxxx</html>";
String f3 = "<html>xxxxxxxxxxx</html>";
String f4 = "<html>xxxxxxxxxxx</html>";
String f5 = "<html>xxxxxxxxxxx</html>";
String f6 = "<html>xxxxxxxxxxx</html>";
String f7 = "<html>xxxxxxxxxxx</html>";
String f8 = "<html>xxxxxxxxxxx</html>";
String f9 = "<html>xxxxxxxxxxx</html>";
String f10 = "<html>xxxxxxxxxx</html>";
String f11 = "";
String res1 = (valor == 1)?f1:f11;
String res2 = (valor == 2)?f2:f11;
String res3 = (valor == 3)?f3:f11;
String res4 = (valor == 4)?f4:f11;
String res5 = (valor == 5)?f5:f11;
String res6 = (valor == 6)?f6:f11;
String res7 = (valor == 7)?f7:f11;
String res8 = (valor == 8)?f8:f11;
String res9 = (valor == 9)?f9:f11;
String res10 = (valor == 10)?f10:f11;
String res11 = (valor == 11)?f10:f2;
lblMsg.setText((res1) + (res2) + (res3) + (res4) + (res5) + (res5) + (res7) + (res8) + (res9) + (res10) + (res11));
valeu, abs!