As you know that nslookup is to fetch IP Address of destination
The Program in java for that is as follow:
/*nslookup*/
import java.net.*;
import java.*;
class nslookup
{
public static void main(String args[]) throws UnknownHostException
{
String s=args[0];
InetAddress ip = InetAddress.getByName(s);
System.out.println("IP Address of: " +ip.toString());
}
}
Output:
The Program in java for that is as follow:
/*nslookup*/
import java.net.*;
import java.*;
class nslookup
{
public static void main(String args[]) throws UnknownHostException
{
String s=args[0];
InetAddress ip = InetAddress.getByName(s);
System.out.println("IP Address of: " +ip.toString());
}
}
Output:
By Hungund Bilal
Student of ARKP
Computer Dept
No comments:
Post a Comment