InetAddress ip1 =InetAddress.getLocalHost();
认真看会发现...教程里的不是new出来的...是直接 InetAddress.getlocalHost获取出来的...难怪直接new了没有getlocalHost方法
InetAddress ip1 =InetAddress.getLocalHost();
认真看会发现...教程里的不是new出来的...是直接 InetAddress.getlocalHost获取出来的...难怪直接new了没有getlocalHost方法