import java.net.*;
import java.util.*;
class NoOfIp
{
public static void main(String args[])throws Exception
{
Scanner s=new Scanner(System.in);
System.out.println("Enter the url: ");
String site=s.next();
InetAddress[] i=InetAddress.getAllByName(site);
int j;
for(j=0;j<i.length;j++)
System.out.println(i[j]);
System.out.println("Number of ip found are: "+j );
}
}
No comments:
Post a Comment