Difference between a URL instance and a URL connection instance

Difference between a URL instance and a URL connection instance.

A URL instance is used to represents the location of a resource. On the other hand, a URL connection instance is used to represent a link for accessing communicating with the resource at the location.

The URL class provides an abstraction of a URL the World Wide Web’s pointer while the URL instance specifies how to reach a resource.
Explain how to make a connection to a URL
How to make a connection to a URL - Connection to the remote object represented by the URL is only initiated when the connect() method of the URLConnection is called...
Explain how to read from a remote file when we have its URL
How to read from a remote file when we have its URL - With the help of the following code you could directly read from the URL:...
What is Uniform Resource Identifier (URI)?
What is Uniform Resource Identifier (URI)? - A URI is in the form of a string of characters for the purpose of identifying an abstract or physical resource...
Post your comment