Vector

Synchronized dynamic array

Vector

Thread-safe but slower. Legacy class.

Code Examples

Vector example

java
1
2Vector<Integer> v = new Vector<>();
3v.add(1);
4          

Use Cases

  • Legacy systems

Common Mistakes to Avoid

  • Using instead of ArrayList

AI Tutor

Ask about the topic

Sign in Required

Please sign in to use the AI tutor

Sign In