This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
What is the effect of adding the sixth element to a vector created in the following manner:
new Vector(5, 10);
An IndexOutOfBounds exception is raised. The vector grows in size to a capacity of 10 elements The vector grows in size to a capacity of 15 elements Nothing, the vector will have grown when the fifth element was added Select the most appropriate answer.
the answer i believe is The vector grows in size to a capacity of 15 elements because the inital was 5 so whenever you go over it , it will be increased to 15 i think that if you go over that , the capacity will be increased proportionaly .