Java示例-获得本地IP地址 Java Calendar computeTime方法 Java示例查找代理设置1 Java示例-获得本地IP地址 import java.net.InetAddress; public class Main { public static void main(String[] args) throws Exception { InetAddress addr = InetAddress.getLocalHost(); System.out.println("Local HostAddress: "+addr.getHostAddress()); String hostname = addr.getHostName(); System.out.println("Local host name: "+hostname); } } Java Calendar computeTime方法 Java示例查找代理设置1