So I know how to take the integers given by a text file and turn them into an array, but I want the user to be able to input the file name. Here's what I have:
Scanner scanner = new Scanner(new File("grades.txt"));
int [] tall = new int [100];
int i = 0;
while(scanner.hasNextInt()){
tall[i++] = scanner.nextInt();
}
Except the text file could be any text file the user inputs, not just grades.txt.
Sorry not great at java :/