i'm trying to set by user input an array length in java and put inside the array a list of Names. The problem is set when it's start the "for" cycle. It's seems that the programm can't go inside this cycle. I'm posting the code where I have got trouble. Please help me how to solve this problem
int numPlayer = 0;
String [] listaNomi = new String []{};
numPlayer = myInput.nextInt();
for (int i=0; i<numPlayer; i++)
{
byte num=1;
System.out.println("Inserisci il nome del " +num);
System.out.print("Giocatore");
num++;
Nome = myInput.nextLine();
Nome = listaNomi[i];
}
Thanks