So far I have been able to generate the random numbers and store them, but I have no idea how not to generate repetition.
So far, it looks like this:
package curso1;
import java.util.Random;
public class Curso7 {
public static void main(String[] args) {
//Verificação
boolean jaexiste;
//Vetor
int[] numeros = new int[5];
//Gerar 5 numeros Aleatórios
Random radom = new Random();
int numeroTmp = 0;
for(int i=0;i<5; i++) {
numeroTmp=radom.nextInt(20);
System.out.println(">"+numeroTmp);
}
}
}