import java.io.Console;
import java.net.InetAddress;
public class MyResolvingDNS1
{
public static void main(String args[]) throws Exception
{
Console cons = System.console();
System.out.println("Enter url or type exit");
String dns = cons.readLine();
while(!dns.equals("exit"))
{
InetAddress addr = InetAddress.getByName(dns);
String host = addr.getHostAddress();
System.out.println(host+" : " +dns);
return dns;
}
}
}
how i want to return the value of "dns" ..
already stuck
please somebody help me