This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I know the basic difference that vector is synchronised and arraylist is not.There is some difference in the default size and the way it expand itself when it becomes full.can someone help me understand the same
Thanks for your reply and time.<br />Windows 2000,j2sdk1.4.2_08
They do use a different algorithm for growing the array. Vector uses the classic multiply-by-two algorithm -- every time the array grows, it doubles in size. From a theoretical standpoint, this has near-optimal performance -- but it uses too much memory. I believe ArrayList uses a more moderate grow-by-50% rule; the performance in real applications is basically the same, and it uses less memory.