Assignment #129 and Simple Web Input
Code
/// Name: Tim Chuang
/// Period: 7
/// Program Name: Simple Web Input
/// File Name: SimpleWebInput.java
/// Date Finished: 6/3/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-tjc.neocities.org/129.txt");
Scanner webIn = new Scanner(mURL.openStream());
String one = webIn.nextLine();
webIn.close();
System.out.println(one);
}
}
Picture of the output