A Java program to get IP address of a Site.






    import java.io.*;
    import java.net.*;
    public class urlIp{
    public static void main(String[] args){
    try{

    InetAddress ip=InetAddress.getByName("www.google.com");//Give the URL of your choice
     

    System.out.println("IP Address: "+ip.getHostAddress());
    }catch(Exception e){System.out.println(e);}
    }
    }





Posted by lol ik

Comments

Popular Posts