JAVA获得域名的IP地址
import Java.net.InetAddress; import java.net.UnknownHostException; public class TestInetAddress { InetAddress myIpAddress = null; InetAddress[] myServer = null; public static void main(String args[]) { TestInetAddress address = new TestInetAddress(); System.out.println("Your host IP is: " + address.getLocalhostIP()); String domain = "www.163.com"; System.out.println("The server domain name is: " + domain); InetAddress[] array = address.getServerIP(domain); int count=0; for(int i=1; i
相关推荐
SIMONDOMAIN 2020-05-09
liuttorrie 2020-07-04
Yakamoz 2020-06-17
Lophole 2020-06-13
liaoxuewu 2020-06-11
技术之博大精深 2020-06-10
Lophole 2020-05-25
gtsjx 2020-05-19
Lophole 2020-05-09
书虫媛 2020-05-03
Lophole 2020-04-29
luvhl 2020-04-10
书虫媛 2020-03-07
Lophole 2020-03-03
SIMONDOMAIN 2020-02-25
SIMONDOMAIN 2020-02-19
zhuakuang0 2020-02-17