How does ArrayList increase its capacity?
Location: http://www.jguru.com/faq/view.jsp?EID=333358 Created: Feb 19, 2001 Modified: 2001-02-19 13:32:49.494 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) Unlike Vector where you can specify a capacity increment, ArrayList doesn’t support this. Instead, ArrayList will increase capacity by about a half when it runs out of space. The refernece implementation uses the forumla: newCapacity = (oldCapacity * 3)/2 + 1 though, this isn’t part of the class definition so others can implement it differently.