由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - List, LinkedList and Vector
相关主题
immutable list如何定义这样的数组?
is access to int[] faster than List?几个Java面试题
help: 两个Java的问题Java是如何处理ArrayList和LinkedList的内存的?
Java SE6 LinkedList implementation issuea question regarding spring collection initialization
请问这个面试题,关于synchronize hashmapHow to make code thread-safe?应该怎么答?
Unmodifiable List concurrent access 问题leetcode请教: time complexy
jvm是怎么implement monitor的?索尼面经 (兼问第十道题)
Java 问题Re: Is there any way to uniquely identif
相关话题的讨论汇总
话题: list话题: vector话题: linkedlist话题: arraylist话题: fast
进入Java版参与讨论
1 (共1页)
F****n
发帖数: 3271
1
List is a general interface implemented by LinkedList, ArrayList, and Vector.
LinkedList is fast to insert and delete, while ArrayList is fast to access
through index. Evaluate your the major future burden on your List before
choose between the two. Vector is not java1.1 stuff, and it implements List
for back compatibility reason. Java2 programming should avoid Vector as much
as possible. If you want a synchronized List, use
Collections.sychronizedList(List) to pack one.
F****n
发帖数: 3271
2
You can get sychcronized Lists using the methods I mentioned above. The
problem of Vector is that you can not get a unsynchronized one:). There are
two reason to use unsynchornized data structure: first, it is much faster,
second, sometimes unnecessary sychronization will cause deadlock problems, for
example, in bean-based application.

than
access
a****o
发帖数: 37
3
use immutable list bah. much easier to do concurrent programming.
check out the following link:
http://gee.oswego.edu/~dl/index.html
there're a pretty cool immutable collection framework and a concurrent
library.
Sometimes a ML style immutable list would be neat and enough.

all
1 (共1页)
进入Java版参与讨论
相关主题
Re: Is there any way to uniquely identif请问这个面试题,关于synchronize hashmap
VECTOR一问Unmodifiable List concurrent access 问题
问一道关于Vector的题jvm是怎么implement monitor的?
state::update的用法是Java 8吗 (转载)Java 问题
immutable list如何定义这样的数组?
is access to int[] faster than List?几个Java面试题
help: 两个Java的问题Java是如何处理ArrayList和LinkedList的内存的?
Java SE6 LinkedList implementation issuea question regarding spring collection initialization
相关话题的讨论汇总
话题: list话题: vector话题: linkedlist话题: arraylist话题: fast