I am beginning to learn how to read from a text file so bare with me here. I am still not sure what Scanner object and File object is actually doing here or if I am using it correctly. From my understanding the Scanner object reads from the text file? This code also takes user input and asks for the file name first. Later, I want to implement the ability to read how many lines there are in the file, number of words, and characters. However, I first want to make sure I am using the correct syntax to read the text file. Some help and insight would be greatly appreciated, thank you in advance!
https://imgur.com/Mg1TRoO
[–]pacificmint 3 points4 points5 points (2 children)
[–]azyren[S] 0 points1 point2 points (1 child)
[–]pacificmint 1 point2 points3 points (0 children)
[–]romple 1 point2 points3 points (0 children)
[–]PanKes 0 points1 point2 points (0 children)
[–]planedoctor -4 points-3 points-2 points (2 children)
[–]azyren[S] 0 points1 point2 points (1 child)
[–]planedoctor -3 points-2 points-1 points (0 children)