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.

0 Shares
Share
+1
Tweet
Share
Stumble