Assignment #129 Simple Web Input
Code
/// Name: John Huh
/// Period: 6
/// Program Name: Simple Web Input
/// File Name: SimpleWebInput.java
/// Date Finished: 5/25/2016
import java.net.URL;
import java.util.Scanner;
public class SimpleWebInput {
public static void main(String[] args) throws Exception {
URL mURL = new URL("http://llhscp-jth.neocities.org/Intro/Printing/4/prog4.html");
Scanner webIn = new Scanner(mURL.openStream());
while ( webIn.hasNext() )
{
String one = webIn.nextLine();
System.out.println(one);
}
webIn.close();
}
}
Picture of the output