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.
it complains the destination isn't big enough to hold the src.
but both Lists are exactly the same size?
My only thoughts are that java is fibbing and doesn't actually allocate memory for the new list at creation just goes "oh yes must remember that".
The new List has a capacity to store the elements (memory allocation), but it's still empty. That means it has a size of 0. Size and capacity are two very different things. The only thing that you can say about them is that the capacity is never smaller than the size.