摘要: 1.IPip相关类InetAddressstatic InetAddress getLocalHost()返回本地主机String getHostName() 返回IP地址的主机名String getAddress() 返回IP地址字符串static InetAddress getByName(String host) 给定主机名的情况下确定IP public static void main(String[] args) throws UnknownHostException{ InetAddress i =InetAddress.getLocalHost();//返回本... 阅读全文
posted @ 2012-07-18 19:24 Carve_Time 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 代码1public class Test2 { public static void main(String[] args) { A a = new B(); a.method(); }}class A { public int a = 10; public void method() { System.out.println(a); }}class B extends A { public int a = 20; public void method() { System.out.println... 阅读全文
posted @ 2012-07-18 15:51 Carve_Time 阅读(208) 评论(0) 推荐(0) 编辑