Assignment #129

Code

    /// Name: Mahima Choudhary
    /// Period: 6
    /// Program Name: Simple Web Input
    /// File Name: SimpleWebInput.java
    /// Date Finished: 5/17/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-bcb.neocities.org/intro/printing/4/prog4.html");
            Scanner webIn = new Scanner(mURL.openStream());
    
            while(webIn.hasNext()) {
                String line = webIn.nextLine();
                System.out.println(line);
            }
            
            webIn.close();
        }
    }
    

Picture of the output

Assignment 129