不知道有什么对这个感兴趣的~我测试的结果是
id=1,name=test1
id=2,name=test2
id=3,name=test3
id=4,name=test4
id=5,name=test5
============
id=1,name=test1
id=2,name=test2
id=10,name=modified
id=4,name=test4
id=5,name=test5
id=1,name=test1
id=2,name=test2
id=3,name=test3
id=4,name=test4
id=5,name=test5
============
id=1,name=test1
id=2,name=test2
id=10,name=modified
id=4,name=test4
id=5,name=test5
解决方案 »
- struts2.0 和dwr整合 http://localhost:8080/项目名称/dwr报错
- 寻求FOR循环中 ORA-01000: 超出打开游标的最大数 的解决方法
- spring和xfire 的jar包冲突问题
- ××× SSH国际化问题。
- (求助)Struts的ApplicationResources文件的解析.
- axis里所带例子部署时出现以下错误怎么解决!!!
- 要选.Net还是Java了,大家给点建议。
- 我的mysql版本为4.0.12的,我在struts中操作mysql数据库,报错no suitable driver,该怎样解决?谢谢!
- struts配置数据源的问题????????
- java连接新浪云的MYSQL 不能插入数据 请各位大神帮我看看!!
- 关于数据库查询的问题,在线等,求帮助
- String 比较不相等的问题?求解
public class Test {
public static void main(String[] args) {
List<Integer> list = new ArrayList<Integer>();
Integer test = null;
for(int i = 0 ; i < 5; i ++){
test = new Integer(i+1);
list.add(test);
}
for(Integer n : list){
System.out.println(n);
}
Integer test2 = list.get(2);
test2 ++;
System.out.println("============");
for(Integer n : list){
System.out.println(n);
}
}
}1
2
3
4
5
============
1
2
3
4
5
这个是不是没有什么代表性?这个输出说明Integer对象和自己定义的对象在内存中的管理方式不一样,这个和int是差不多的……
懂了~谢谢~