package com.net.luzhiming;
import java.net.InetAddress;
public class InetAddressTest1 {
public static void main(String[] args) throws Exception {
System.out.println(InetAddress.getLocalHost());
System.out.println(InetAddress.getByName("www.baidu.com"));
}
}
InetAddress 获得Ip地址
最新推荐文章于 2022-07-13 08:55:19 发布