标签:java.net add div void name unknown cep tac ace
import java.net.InetAddress; import java.net.UnknownHostException; public class MainProcess { public static void main(String[] args) { InetAddress localhost = null; try { localhost = InetAddress.getLocalHost(); } catch (UnknownHostException e) { e.printStackTrace(); } System.out.println ("localhost: "+localhost.getHostAddress()); System.out.println ("localhost: "+localhost.getHostName()); } }
标签:java.net add div void name unknown cep tac ace
原文地址:http://www.cnblogs.com/tiandsp/p/7467862.html