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.
You would usually be better off using java.util.ArrayList than Vector. And you are also better using the name of the interface List to declare the list rather than the class name. And don't use variable names like newvct; call them something which a reader can understand.
Joined: Oct 13, 2005
And to get the elements back use the for-each loop or an Iterator rather than an Enumeration.
After reading the differences between Vector class and ArrayList i can understand that it differs in the way of synchronization. Synchronization is the only bottle neck in using Vector when compared to ArrayList or else more?