Assignemnt #129 Web Input

Code

  /// Name: JJ Deng
    /// Period: 6
    /// Program Name: SimpleWebInput
    /// File Name: Webinput.java
    /// Date Finished: 6/3/2016
    
  import java.net.URL;
  import java.util.Scanner;
  
  public class Webinput {
  
      public static void main(String[] args) throws Exception {
  
          URL mURL = new URL("http://llhscp-zd.neocities.org/123.txt");
          Scanner webIn = new Scanner(mURL.openStream());
  
          String one = webIn.nextLine();
          
          String two = webIn.nextLine();
  
          webIn.close();
  
          System.out.println(one);
          System.out.println(two);
      }
  }


    

Picture of the output

Assignment 120