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.
Originally posted by Stan James: I don't know if it's worth saving a few cycles to allocate a new list just for that argument.
Yeah. But both IDEA and Eclipse have a keyboard shortcut to automatically do out the whole thing, including allocating the right-sized array, and I've seen it so often that to me, at least, it feels like an idiom.