// Yazzy Latif // 7/27/2020 // CSE142 // TA: Grace Hopper // This program prompts for a url and shows the content of the corresponding web page import java.util.*; import java.net.*; import java.io.*; public class EchoWebPage { public static void main(String[] args) throws IOException { Scanner console = new Scanner(System.in); System.out.println("this is a program that echoes web page content"); System.out.print("url? "); String url = console.nextLine(); Scanner input = new Scanner(new URL(url).openStream()); while (input.hasNextLine()) { String line = input.nextLine(); System.out.println(line); } } }