In the JDK 1.7 into the ArrayList.java the method ensureCapacity increments the array capacity using the following expression: int newCapacity = oldCapacity + (oldCapacity >> 1) so it seems that the new capacity will be almost the 50% more than the old.
However in many books is said that the capacity is doubled… so the books aren’t updated or I don’t understand well?
You’re understanding is correct, newCapacity is 50% more than oldCapacity
In Java 6 newCapacity is calculated as
This is the beauty of an open source language such as Java, you can see the implementation – if it doesn’t fit your requirements, you can implement your own.