NOTE

Vector

Legacy synchronized Vector behavior and why ArrayList or specialized concurrent collections are usually preferred.

JavaCreated Updated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

Vector is a legacy resizable-array collection whose public operations are synchronized.

Its synchronization makes individual operations mutually exclusive, but compound operations still require correct external coordination. The coarse locking also does not make it an ideal modern concurrent collection.

Use ArrayList when no shared concurrent mutation is needed; otherwise select a concurrent collection or explicit synchronization strategy appropriate to the workload.

Loading helpful count