开发者社区 问答 正文

ArrayList 和 Vector在线程安全上,有什么区别?

ArrayList 和 Vector在线程安全上,有什么区别?

展开
收起
叫我饭啊啊 2021-10-25 16:30:19 1201 分享 版权
1 条回答
写回答
取消 提交回答
  • Vector 使用了 Synchronized 来实现线程同步,是线程安全的,而 ArrayList 是非线程安全的。

    2021-10-25 16:30:35
    赞同 展开评论