// Miya Natsuhara // 07-29-2019 // CSE142 // TA: Grace Hopper // This program prompts for a url and shows the content of the corresponding web page import java.util.*; import java.io.*; import java.net.*; public class EchoWebPage { public static void main(String[] args) throws IOException { Scanner console = new Scanner(System.in); System.out.println("This program echoes the contents of a web page."); System.out.print("url? "); String url = console.nextLine(); Scanner input = new Scanner(new URL(url).openStream()); while (input.hasNextLine()) { System.out.println(input.nextLine()); } } }