Basics
- Java uses URL to provide a view of web page location.
Important constructor for creating a URL
- Suppose s is a String encoding an http specification; e.g., "http://www.cs.virginia.edu/cs101x".
- URL u = new URL( s );
- Makes u a variable giving a URL view of the web page name.
How to set up a Scanner to read from a URL
- Suppose u is a URL.
- Scanner stream = new Scanner( u.openStream() );
- Makes stream a variable giving a Scanner view of the URL u.