import java.util.*; // for Scanner import java.io.*; // for File import java.net.*; // Prints out all the tokens found by visting a URL -- currently // hardcoded to the CS142 homepage. public class Echo3 { public static void main(String[] args) throws IOException { // NOTE: you don't need to study anything about the URL class -- // this is just here as an example that shows that Scanners // can read user input, files, AND from URLs (web pages) String url = "https://courses.cs.washington.edu/courses/cse142/17au/"; Scanner input = new Scanner(new URL(url).openStream()); while (input.hasNext()) { System.out.println(input.next()); } } }