Olá Sou novo aqui e novo na linguagem tbém. Então o jeito é pedir um help pra geral.
Estou tentando fazer uma atividade que registre o nome de 10 alunos, registre 3 notas para cada aluno, mas informe apenas o nome do aluno, a média e (aprovado quando >5, em recuperação se = 5; e reprovado se < 5)
comecei fazendo mas não tô conseguindo converter de String para inteiro.
public class Main {
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int n1, n2, n3, media;
Scanner alunos = new Scanner(System.in);
String [] nomes = new String[10];
for (int i = 0; i<=9; i++){
System.out.println("Digite o "+(i+1)+"º Nome:" );
nomes[i] = alunos.next();
}
Scanner not1 = new Scanner(System.in);
String []nota1 = new String[10];
Scanner not2 = new Scanner(System.in);
String [] nota2 = new String[10];
Scanner not3 = new Scanner(System.in);
String [] nota3 = new String[10];
n1 = Integer.parseInt(nota1);
n2 = Integer.parseInt(nota2);
n3 = Integer.parseInt(nota3);
media =(n1+n2+n3)/3;
for (int i = 0; i<=9; i++){
System.out.println("Digite a "+(i+1)+"º Nota 1:");
}
for (int i = 0; i<=9; i++){
System.out.println("Digite a "+(i+1)+"º Nota 2:");
}
for (int i = 0; i<=9; i++){
System.out.println("Digite a "+(i+1)+"º Nota 3:");
}
for (int i = 0; i<=9; i++){
System.out.println("Nomes: "+nomes[i]+" a média é: "+media);
}
}
}
Agradeço a todos!!