Collections.syncronizedList是否有效地为向量?(Is Collections.syncronizedList effectively a vector?)

编程入门 行业动态 更新时间:2024-10-08 06:21:38
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.

更多推荐

本文发布于:2023-07-27 08:29:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1287753.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:向量   有效地   syncronizedList   Collections   effectively

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!