Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区 » 实战错误讨论  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 一位“资深”同事为了对象重用,而写下的代码....
cxp108





发贴: 363
积分: 12
于 2009-01-22 17:12 user profilesend a private message to usersend email to cxp108search all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Document [] old ......//这是数据源
EntityDocument[] newArray = new EntityDocument[old.length];//自定义的类,为了把Document里数据保留下来避免Document被关联对象关闭而导致无法取出数据。
EntityDocument d = new EntityDocument();
for(int i=0;i<old.length;i++){
d.content = old[i].getContent();
d.key = old[i].getKey();
d......................
newArray[i] = d;//如此对象重用.....
}




话题树型展开
人气 标题 作者 字数 发贴时间
27649 一位“资深”同事为了对象重用,而写下的代码.... cxp108 350 2009-01-22 17:12
23818 Re:一位“资深”同事为了对象重用,而写下的代码.... 九佰 1841 2009-01-23 17:10
22596 Re:一位“资深”同事为了对象重用,而写下的代码.... informixca 786 2009-03-17 23:36
23177 Re:一位“资深”同事为了对象重用,而写下的代码.... JiafanZhou 1592 2009-02-19 23:56
23179 Re:一位“资深”同事为了对象重用,而写下的代码.... tangming 105 2009-02-24 17:40
23165 Re:一位“资深”同事为了对象重用,而写下的代码.... cxp108 155 2009-02-25 14:58
23334 Re:一位“资深”同事为了对象重用,而写下的代码.... wuanfo 4 2009-04-08 08:44
24037 Re:一位“资深”同事为了对象重用,而写下的代码.... cxp108 415 2009-01-25 01:10
23545 Re:一位“资深”同事为了对象重用,而写下的代码.... breezehou 492 2009-02-06 09:09
23743 Re:一位“资深”同事为了对象重用,而写下的代码.... ditty 55 2009-02-11 15:08
23464 Re:一位“资深”同事为了对象重用,而写下的代码.... cxp108 269 2009-02-13 15:58
23889 Re:一位“资深”同事为了对象重用,而写下的代码.... JiafanZhou 21 2009-01-28 17:05
23836 Re:一位“资深”同事为了对象重用,而写下的代码.... cxp108 79 2009-02-01 10:31
23848 Re:一位“资深”同事为了对象重用,而写下的代码.... Biubiu 16 2009-02-03 15:11
23782 Re:一位“资深”同事为了对象重用,而写下的代码.... cxp108 120 2009-02-04 18:23
23648 Re:一位“资深”同事为了对象重用,而写下的代码.... JiafanZhou 651 2009-02-04 20:24
23725 Re:一位“资深”同事为了对象重用,而写下的代码.... menzy 52 2009-02-04 15:35
23770 Re:一位“资深”同事为了对象重用,而写下的代码.... cxp108 11 2009-02-04 18:30
23613 Re:一位“资深”同事为了对象重用,而写下的代码.... ditty 268 2009-02-13 16:42
23593 Re:一位“资深”同事为了对象重用,而写下的代码.... cxp108 366 2009-02-13 17:26
23447 Re:一位“资深”同事为了对象重用,而写下的代码.... lxh_ming 179 2009-02-14 03:06
23511 Re:一位“资深”同事为了对象重用,而写下的代码.... ditty 209 2009-02-17 13:18
23320 Re:一位“资深”同事为了对象重用,而写下的代码.... cxp108 292 2009-02-18 15:56
23193 Re:一位“资深”同事为了对象重用,而写下的代码.... JiafanZhou 3151 2009-02-18 18:18
23333 Re:一位“资深”同事为了对象重用,而写下的代码.... cxp108 216 2009-02-19 15:24
23338 Re:一位“资深”同事为了对象重用,而写下的代码.... ditty 195 2009-02-19 13:22

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923