Simple Web Input

In Java, reading text from a web page isn't much more difficult than reading from a text file! Download the following code and get it to compile.

Files Needed

(Do not re-type this program. Simply download a copy of the file by right-clicking and choosing "Save link as..." from the context menu. Save it into your normal code folder.)

What You Should See

Mr. Mitchell is cool.

Study Drills

Assignments turned in without these things will receive half credit or less.

  1. The code provided only reads a single line from the URL given, but mitchellis.txt contains two lines. Add in code to read in and display the second line as well.
  2. Once that works, change the URL to read text from a different web location.

©2013–2015 Graham Mitchell

This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.
Creative Commons License