IP Address

import java.net.*;
class InetDemo
{
     public static void main(String arg[])
     {
try
{
InetAddress local=InetAddress.getLocalHost();
System.out.println("Ip address of local pc="+local);
InetAddress remote =InetAddress.getByName("fileserver");
System.out.println("ip address of remoten pc i.e. fileserver ip="+remote);
}
catch(UnknownHostException e)
{ System.out.println("error is DNS"+e);
}
}
}

Comments

Popular posts from this blog

தட்டு வண்டியில் காளிக்கோயில் - சிறுகதை

பிரேமாவின் பெண் குழந்தை

தீபம் பிளக்ஸ்