实例化InetAddress:
1,getByName(String host)
2,getLocalHost
两个常用方法:
1,获取本机的地址 :
inet=InetAddress.getLocalHost();
2,获取域名:
inet=InetAddress.getHostName();
实例化InetAddress:
1,getByName(String host)
2,getLocalHost
两个常用方法:
1,获取本机的地址 :
inet=InetAddress.getLocalHost();
2,获取域名:
inet=InetAddress.getHostName();