Differentiate between array list and vector list.
The first thing that everyone should know about array and vector lists is that both of them are used to implement list interface and an array is used for their internal structures by both of them.
Difference Between Array and Vector List:
- Synchronization: The vector list is synchronized but the Array list is not.
- Performance: Array list is faster than the Vector list because array lists are not synchronized hence they can perform better and faster.
- Data Growth: Both of them grow and shrink dynamically but the way in which they resize is different. The increment in the Array list is 50% of its current size it the number of elements that are to be stored is more than it’s capacity whereas the Vector list increments 100% of its current size.
BY Best Interview Question ON 17 Dec 2019