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

您没有登录

» Java开发网 » Java SE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 请教:对于数据量较大的数据,用什么类型的容器好?
sc33



版主


发贴: 128
积分: 30
于 2003-05-27 10:54 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
数组、Vector.....?


作者 Re:请教:对于数据量较大的数据,用什么类型的容器好? [Re:sc33]
nerd





发贴: 42
积分: 0
于 2003-05-27 20:14 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Vector or ArrayList?


作者 Re:请教:对于数据量较大的数据,用什么类型的容器好? [Re:sc33]
烂泥





发贴: 538
积分: 72
于 2003-05-28 12:39 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
这个和实际情况相关!

Vector和ArrayList基本上没有区别



作者 Re:请教:对于数据量较大的数据,用什么类型的容器好? [Re:javaduke]
Jove



CJSDN高级会员


发贴: 1228
积分: 194
于 2003-05-28 13:41 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
略微的差别就是同步问题
Vector是的插入删除方法是同步的,而ArrayList不是
所以如果对于这个动态结构的操作是单线程的,用ArrayList会快一些
而且ArrayList是Collection Framework一部分,功能更强大一些



准备找一份新的工作,一份新的开始.
希望在上海做一个地道的Java Developer, 仅此而已

如有合适的机会,请与我Email联系

作者 Re:请教:对于数据量较大的数据,用什么类型的容器好? [Re:sc33]
sc33



版主


发贴: 128
积分: 30
于 2003-05-28 16:30 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
那Hashtable呢??

既然区别都不大,为什么还分这几种类型?



作者 Re:请教:对于数据量较大的数据,用什么类型的容器好? [Re:sc33]
java8964





发贴: 49
积分: 24
于 2003-05-28 23:52 user profilesend a private message to usersend email to java8964search all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
You do need a book about Data Structure.

Find a book about data structure, understanding the basic idea. Then go to here
http://java.sun.com/docs/books/tutorial/collections/
to read the collection tutorial.



作者 Re:请教:对于数据量较大的数据,用什么类型的容器好? [Re:sc33]
fengyifan



发贴: 0
积分: 0
于 2003-06-04 08:02 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
固定数量吗?数组.
排序吗?TreeSet
快速检索?HashSet
多线成?Vector或用Collections把Arraylist同步话
.......




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