ソースを参照

Uploaded file describing "Connecting to and reading from a web page"

Trinh Tong 6 年 前
コミット
363bdd97a9
共有1 個のファイルを変更した16 個の追加0 個の削除を含む
  1. 16
    0
      TrinhT.md

+ 16
- 0
TrinhT.md ファイルの表示

@@ -0,0 +1,16 @@
1
+Reading from a website code
2
+
3
+The program is using the scanner class as a reader.
4
+Up to this point, we've used it to take in inputs
5
+from the keyboard, but redirecting the input to the
6
+URL "mySite" and establishing a connection between
7
+the site and our scanner, it can read what's on the site.
8
+
9
+The while loop checks that there is something
10
+to return back by checking if "hasNext" == true.
11
+
12
+From there, the program keeps track of how many lines with the count variable and then returns it
13
+at the end.
14
+
15
+The try/catch is for handling exception errors?
16
+It will try the program and then if there is an exception it will catch it and then show Documentation what might have happened.