I originally intended to write a chapter on the collection framework discussing each and every collection. However, I could not get away from the 80–20 principle: 20 percent of the available data structures will be used 80 percent of the time. Since your time is valuable, I wanted to get straight to the point and discuss the two collections that I see most often in commercial code. These are
Hashtable. I don't doubt that people are also using
ArrayList and other fine collections, but the discussion of
Hashtable performance issues will capture many of the generic principles underlying the other collections as well.
Vector Add and Remove
Vector public interface ...