public static void getBooks(){
int bookNum = 0;
bookFile = new File(args[0]);
Scanner input = new Scanner(bookFile);
while (input.hasNextLine()) {
bookNum += 1;
input = input.nextLine();
}
...
}
I need it to add the number of books as long as there are books to add meaning while there is a next line.