What is difference between ArrayList and Vector in Java is a popular Java interview question.
Vector vs ArrayList
1.The main difference between Vector and ArrayList is that Vector is synchronized and ArrayList is not synchronized.methods such as addElement(),remove(),setElementAt() etc in vector are synchronized hence it is thread-safe and can be used in multi-threaded application ,where as ArrayList methods are not synchronized hence not suitable for multi-threaded application.
2.since Vector is synchronized and thread-safe it is slower than ArrayList .
3. elements () method is used to traverse items of a vector where as Iterator and ListIterator can be used to traverse items of a ArrayList.
4.Vector supports Enumeration but ArrayList doesn’t.