获取本机IP地址
2020-11-07 本文已影响0人
大风过岗
获取本机IP地址
public static void main(String[] args)throws Exception {
String localhost = InetAddress.getLocalHost().getHostAddress();
System.out.println(localhost);
}
public static void main(String[] args)throws Exception {
String localhost = InetAddress.getLocalHost().getHostAddress();
System.out.println(localhost);
}