📜  ip 地址 - 任何代码示例

📅  最后修改于: 2022-03-11 14:54:58.653000             🧑  作者: Mango

代码示例3
import java.net.InetAddress;
import java.net.UnknownHostException;
public class FindIPaddress {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress a = InetAddress.getLocalHost();
        System.out.println(a.getHostAddress());    
    }
}