This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I am trying to come up with a good explination for my choices.txt and would appreciate some comments. In my DBAdapter class, I have a method which returns a list of contractors but am not sure if I should return the list as an ArrayList or Vector. Which will be the best to use...? and why? Both have dynamic sizing capabilities, but Vectors are synchronized... Thank you in advance...
hi Wickes: Sun documentation refers to ArrayList, HashMap, and HashSet as being the preferred "primary implementations". Their overall performance is better, and you should use them unless you need a special feature provided by another implementation. In general, Vector is slower because all of its methods are sync. Regular array are lighter wieght than any other collection class. If you find arrays fit your needs, you should consider them first, otherwise you should looke for the appropriate collection calss. [ May 10, 2004: Message edited by: Hanna Habashy ]
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle