Write a program to check your own ip address...

import java.net.*;

class CheckIp
{
       public static void main(String args[])
      {
       try
       {
         InetAddress address=InetAddress.getLocalHost();
         System.out.println(address);
        }
     catch(UnknownHostException e)
   {
  System.out.println("could not find yahoo .com");
}
}
}

No comments:

Post a Comment