Tim Moores wrote:
Arun Giridharan wrote:Container calls only once ...
That's generally true, but the container is free to take a servlet out of service and put it back into service at any time it chooses. So you can't rely on it only happening once.
Campbell Ritchie wrote:If you have any idea how many references you wish to keep in your List, you can use the ensureCapacity(int) method to speed things up. You will find that method in ArrayList and Vector, but not in LinkedList because it is unnecessary there.