1) URL is a class present in the java.net package.
2) By using the URL we are accessing some information present in the world wide web.
Example of URL is:
http://www.freetimelearning.com/java/java-urls.php
The URL contains information like
a. Protocol to use http://
b. Server name/IP address www.freetimelearning.com
c. File name or directory name java/java-urls.php
3) To crate the object for URL we have to use the fallowing syntax
a. URL obj=new URL(String protocol, String host, int port, String path);
b. URL obj=new URL(String protocol, String host, String path);