Initially capacity of a Vector:10
[10, 6, 12, 8, 13, 1, 5, 2, 0, 7]
After adding element beyond the cpacity
[10, 6, 12, 8, 13, 1, 5, 2, 0, 7, 9]
then cpacity20
Created new Vector object and give capacity as 3 and add elements
[6, 1, 12]
After adding element beyond the capacity
[6, 1, 12, 2]
Then capacity: 6
Created new Vector object and pass the another vector object in the constructor is v1
New vector capacity: 4
Created new Vector object and give initial capacity 3 and incremental 2 factor then
Add Element into the vector
[6, 1, 12]
After adding element beyond the capacity
[6, 1, 12, 2]
Then capacity: 5
Iterate the elements of Vector through iterator
10 6 12 8 13 1 5 2 0 7 9
Iterate the elements of Vector through enumeration
10 6 12 8 13 1 5 2 0 7 9