Question: what is the difference between array and vector in java?
Answer: Vectors. The key difference between Arrays and Vectors in Java is that Vectors are dynamically-allocated. They aren't declared to contain a type of variable; instead, each Vector contains a dynamic list of references to other objects. ... When a Vector is instantiated, it declares an object array of size initialCapacity.