Collections.syncronizedList是否有效地为向量?(Is Collections.syncronizedList effectively a vector?)
Collections.syncronizedList(new ArrayList())有效地使arrayList成为一个向量? 如果没有那么它还有什么额外的作用? 如果是,那么为什么它首先被引入?
谢谢。
Does Collections.syncronizedList(new ArrayList()) effectively makes the arrayList a vector? If no then what extra does it do? If yes then why was it introduced in the first place?
Thanks.
最满意答案
它提供任何列表的同步视图(包装器)。 差异:
您可以对任何列表实现进行同步视图。 同步的LinkedList不是Vector 。 原始列表不同步 - 只有视图。It provides a synchronized view (a wrapper) of any list. The differences:
you can make a synchronized view of any list implementation. A synchronized LinkedList is not a Vector. the original list is not synchronized - only the view is.更多推荐
发布评论