InetAddress IP4=InetAddress.getByName("192.168.1.100"); InetAddress IP4=InetAddress.getByName("192.168.1.100");转换IP4=/192.168.1.100为什么多了个"/"?应该怎样做? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ip4.getHostAddress();toString() 是 getHostName()/getHostAddress() 形式的。参考:import java.net.InetAddress;import java.net.UnknownHostException;public class Test { public static void main(String[] args) throws UnknownHostException { InetAddress ip4 = InetAddress.getByName("community.csdn.net"); System.out.println(ip4.toString()); }} 求救啊!!!java填充数据到excel中 新手求助:关于面向对象的基本概念 关于数组对象长度 BufferedOutputStream与socket的问题 请教达人。。。 如何实现这个? 要做一个程序的启动画面,这段程序有错误嘛? 心情不好,放分 菜鸟问题,类的导入 关于树节点的显示问题,大家看会是什么问题? 我要求银行的复利计算 请教一下,JAVA开发的代码有没有继承窗体的哪个概念?
import java.net.UnknownHostException;public class Test {
public static void main(String[] args) throws UnknownHostException {
InetAddress ip4 = InetAddress.getByName("community.csdn.net");
System.out.println(ip4.toString());
}
}