Originally posted by sabyasachi mondal:
Question no. 49. -- John Hunt Mock Exam
What is the effect of adding the sixth element to a vector created in the following manner?
new Vector (5, 10);
A.An IndexOutOfBounds exception is raised.
B.The vector grows in size to a capacity of 10 elements
C.The vector grows in size to a capacity of 15 elements
D.Nothing, the vector will have grown when the fifth element was added
If anyone can clarify this. Thanks for your attention.
regards,
mondal
Thanks to Shair, Bill and Anil. Your previous explanations make it well clear. Still I would like to go with it with the following question (i am not sure whether it make sense!!)
What is the effect of adding the 3rd element to a vector created in the following manner?
Thanks for your attention again.
mondal