What is the difference between URL and URLConnection?

What is the difference between URL and URLConnection?

The URL has a number of component parts. The URL locates a the resource over the internet. The URL class encapsulates Internet URLs. In a way, it does for the Internet resources what the File class does for local files. URL instance represents the location of a resource, and a URLConnection instance represents a link for accessing or communicating with the resource at the location.

By:Jalees
Date:2015-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher