Network Programming - AB 1
Network Programming - AB 1
PROGRAM
import java.net.InetAddress;
public class IP_Address
{
public static void main(String args[]) throws Exception
{
InetAddress IP = InetAddress.getLocalHost();
System.out.println("IP of my system is := "+IP.getHostAddress());
}
}
Output:
IP of my system is := 127.0.1.1