Java示例-获得主机IP地址1 Java Calendar clone方法 Java 日历 Calendar compareTo方法 Java示例-获得主机IP地址1 import java.net.InetAddress; public class Main { public static void main(String[] argv) throws Exception { InetAddress addr = InetAddress.getByName("70.125.67.10"); System.out.println("Host name is: "+addr.getHostName()); System.out.println("Ip address is: "+ addr.getHostAddress()); } } Java Calendar clone方法 Java 日历 Calendar compareTo方法