ArrayList: It is not synchronize, It increments 50% of current array size if the number of elements exceeds from its capacity., It is not a legacy class. It is introduced in JDK 1.2., It is fast because it is non-synchronized., It uses the Iterator interface to traverse the elements., Vector: It is synchronized., it increments 100% means doubles the array size if the total number of elements exceeds than its capacity., It is a legacy class., It is slow because it is synchronized, i.e., in a multithreading environment, it holds the other threads in runnable or non-runnable state until current thread releases the lock of the object., It can use the Iterartor interface or Enumeration interface to traverse the elements.,

Distinguish between ArrayList and Vector in the Java

Leaderboard

Visual style

Options

Switch template

Continue editing: ?