I would like to know why I run the algorithm on the screen, the line that asks for the student's name to be printed twice.
Scanner input = new Scanner(System.in);
System.out.println("Quando o tamanho do conjunto de alunos");
int tamanho = input.nextInt();
String[] alunos = new String[tamanho];
for(int i = 0; i < tamanho; i++)
{
System.out.println("Digite o nome do aluno");
alunos[i] = input.nextLine();
}