Question: what is the difference between the size and capacity of a vector in java?
Answer: What is the difference between size and capacity of a Vector in Java? The size of a vector represents the number of components in the vector. The capacity of a vector represents the maximum number of elements the vector can hold.