当前位置: 技术问答>java相关
那位大虾知道怎样得到本机的IP地址或计算机名?
来源: 互联网 发布时间:2015-11-07
本文导语: 谢谢! | InetAddress localhost = InetAddress.getLocalHost(); localhost.getHostAddress(); localhost.getHostName();
谢谢!
|
InetAddress localhost = InetAddress.getLocalHost();
localhost.getHostAddress();
localhost.getHostName();
localhost.getHostAddress();
localhost.getHostName();