Assignment #129 and Simple Web Input
Code
///Name: Tim Gibson
///Period: 6
///Project Name: Simple Web Input
///File Name: SimpleWebInput.java
///Date Finished: 1/14/16
import java.net.URL;
import java.util.Scanner;
public class SimpleWebInput {
public static void main(String[] args) throws Exception {
URL mURL = new URL("https://en.wikipedia.org/wiki/Spotlight_(film)");
Scanner webIn = new Scanner(mURL.openStream());
String one;
do {
one = webIn.nextLine();
System.out.println(one);
} while (webIn.hasNext());
webIn.close();
}
}
Picture of the output