The Java InetAddress class represents an IP address and provides methods to look up host names and IP addresses. It allows getting the IP address of websites like www.javatpoint.com and www.google.com. Commonly used methods include getByName() to get an InetAddress instance by host name, getLocalHost() to get the local host, getHostName() to return the host name, and getHostAddress() to return the IP address as a string.
The Java InetAddress class represents an IP address and provides methods to look up host names and IP addresses. It allows getting the IP address of websites like www.javatpoint.com and www.google.com. Commonly used methods include getByName() to get an InetAddress instance by host name, getLocalHost() to get the local host, getHostName() to return the host name, and getHostAddress() to return the IP address as a string.
The Java InetAddress class represents an IP address and provides methods to look up host names and IP addresses. It allows getting the IP address of websites like www.javatpoint.com and www.google.com. Commonly used methods include getByName() to get an InetAddress instance by host name, getLocalHost() to get the local host, getHostName() to return the host name, and getHostAddress() to return the IP address as a string.