Simple Web Input

Code

    /// Name: Rachel Smith
    /// Period: 5
    /// Program Name: Simple Web Input
    /// File Name: SimpleWebInput.java
    /// Date Finished: 3/4/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-rms.neocities.org/intro/fileinputandoutput/128/FileInputandOutput128.html");
            Scanner webIn = new Scanner(mURL.openStream());
            
            String one;
    
            while(webIn.hasNext()) {    
                
                one = webIn.nextLine();
    
                System.out.println(one);
            
            }
            
            webIn.close();
        }
    }


    

Picture of the output

Assignment 1