摘要: 先来一段代码: ArrayList a = new ArrayList(); a.add(new Integer(3)); Iterator it = a.iterator(); a.add(new String("hellow")); while(it.hasNext())... 阅读全文
posted @ 2011-09-10 23:25 wangicter的博客 阅读(434) 评论(0) 推荐(0) 编辑
摘要: int 是基本类型,直接存数值 integer是对象,用一个引用指向这个对象 1.Java 中的数据类型分为基本数据类型和复杂数据类型 int 是前者>>integer 是后者(也就是一个类) 2.初始化时>> int i =1; Integer i= new Integer(... 阅读全文
posted @ 2011-09-10 21:07 wangicter的博客 阅读(122) 评论(0) 推荐(0) 编辑