Program #129

Code

   
    /// Name: Afaf Nabeeha
    /// Period: 7
    /// Program Name: Simple Web Input
    /// File Name: Simple.java
    /// Date Finished: 3/8/2016 public class Simple

        import java.net.URL;
        import java.util.Scanner;
        
        public class Simple {
        
            public static void main(String[] args) throws Exception {
        
                URL mURL = new URL("http://www.acalanes.k12.ca.us/laslomas/");
                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 129