2007年3月8日
摘要: 以下代码为例: 1public class Sample 2{ 3 public static void main(String [] args) 4 { 5 A a = new B(); //父类A引用子类B的实例 6 if(a instanceof B) 7 System.out.println("对象 a 是类 B 的实例"... 阅读全文
posted @ 2007-03-08 00:08 豆豆の爸爸 阅读(1893) 评论(2) 推荐(0) 编辑