Witam
Mam problem z tabelami
int input;
String name;
System.out.println("Please enter amount of students: ");
input = in.nextInt();
System.out.println("Please enter students names: ");
name =in.nextLine();
int amount[] = new int[input];
String names[] = new String[name];
Program ma obliczac srednia ocen, min, max itd. Mam maly problem z tabelami jedna jest int druga string do nazw ale przy kompilacji wyrzyca mi blad string nie moze byc konwertowany na int. Jak zrobic to zeby po przykładowo wyborze 2 mogł wprowadzic tylko dwa imiona.
Dzieki z góry.
Pozdrawiam.