import java.net.*;
class GetAddress
{
public static void main(String[] args) throws Exception
{
InetAddress[] ins = InetAddress.getAllByName("http://www.baidu.com");
for(InetAddress i : ins)
{
System.out.println("ip:"+i.getHostAddress());
}
}
}
day25/GetAddress.java
最新推荐文章于 2022-03-29 21:39:31 发布