2
How do I get only one value from a variable you use Random
and store in another variable? It is possible?
Wanted to store what will appear to the user
int cartaUnoPersonagem = new Random().nextInt(personagem.length);
System.out.println("Certo "+nome+", você é um(a):"+personagem[cartaUnoPersonagem]);
No need for parentheses, can use direct
new Random().nextInt(personagem.length)
: https://ideone.com/MA9DaD– Jefferson Quesado
@Jeffersonquesado Thanks, I corrected the answer.
– Piovezan