Assignment #129

Code

        /// Name: Georgi Atanasov
        /// Period: 5
        /// 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-gaa.neocities.org/intro/printing/4/Program4.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