Use Of URL in java
import java.net.*;
class myurl
{
public static void main(String args[])throws Exception
{
URL myurl = new URL("http://http://naveenrajput10.blogspot.in/");
System.out.println("HOST : "+myurl.getHost());
System.out.println("PATH : "+myurl.getPath());
System.out.println("PORT : "+myurl.getPort());
System.out.println("PROTOCOL : "+myurl.getProtocol());
}
}