This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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?