By Raaghul S
In this Java program , we are able to obtain the information about the host, network, protocol and domain of the defined url.
For compiling this Java program, we need Java standard libraries
Java standard libraries
With the help of the url.getHost() we can display the Host name from the given url.
The url.getPort() helps the Port number of the site given in the program.
The url.getProtocol() helps to display the Protocol used in the site.
This Java program helps to fetch the information about the Host, Network, Protocol and the Domain of the url defined by the user.
The necessary exceptions have also been raised if the input given by the user is not in the correct format.