From the program given bellow you can able to find the IP Address of your system..Check this out...
Program coding:
import java.net.InetAddress;
class IPAddress
{
public static void main(String args[]) throws Exception
{
System.out.println(InetAddress.getLocalHost());
}
}
class IPAddress
{
public static void main(String args[]) throws Exception
{
System.out.println(InetAddress.getLocalHost());
}
}
Output:
122.164.255.215
No comments:
Post a Comment