TrinhT.md 677B

Reading from a website code

The program is using the scanner class as a reader. Up to this point, we've used it to take in inputs from the keyboard, but redirecting the input to the URL "mySite" and establishing a connection between the site and our scanner, it can read what's on the site.

The while loop checks that there is something to return back by checking if "hasNext" == true.

From there, the program keeps track of how many lines with the count variable and then returns it at the end.

The try/catch is for handling exception errors? It will try the program and then if there is an exception it will catch it and then show Documentation what might have happened.