InterviewSolution
Saved Bookmarks
| 1. |
ArrayList vs Vector in Java |
||||||||||||||||||||||||
|
Answer» The java.util.ArrayList class extends the AbstractList class. It is a part of the collection framework. The ArrayList is initialized a size which is capable of INCREASING or decreasing its size when OBJECTS are separated from the collection. The java.util.Vector class represents DYNAMIC data structures which can expand when a new element is added to them. Vectors are synchronized and contain MANY methods that are not a part of the Collections framework in Java. Here are a few key differences between Vectors and ArrayList:
|
|||||||||||||||||||||||||