“`” 线程安全:Vector 使用了 Synchronized 来实现线程同步,是线程安全的,而 ArrayList 是非线程安全的。

<b>性能</b>:ArrayList 在性能方面要优于 Vector。

<b>扩容</b>:ArrayList 和 Vector 都会根据实际的需要动态的调整容量,只不过在 Vector 扩容每次会增加 1 倍,而 ArrayList 只会增加 50%。

<pre><code> "“`

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.