- 注册时间
- 2011-10-23
- 最后登录
- 2011-10-27
- 阅读权限
- 30
- 积分
- 405
- 精华
- 0
- 帖子
- 129
 
升级   68.33%
|
相关的主题文章:
书籍跟杂志
他有爱好的人
好好休息
能做二奶反而成了一种光荣
一时光
import java.net.InetAddress;
import java.net.UnknownHostException;
public class NetTester{
public NetTester(){
try{
InetAddress inet = InetAddress.getLocalHost();
System.out.println("本机的ip=" + inet.getHostAddress());
}catch(UnknownHostException ex){
System.out.println("获取失败");
ex.printStackTrace();
return;
}
}
public static void main(String[] args){
NetTester aTest = new NetTester();
}
}
时不断仍是有用的。 |
|