Read the URL – Java

This short program demonstrates the URL and URLConnection classes by attempting to open a connection to a URL and read text from it. The url must be specified on the command line. If an error occurs, a message is output. Otherwise, the text from the URL is copied to the screen.

Leave a Reply