ArrayList in java – in depth analysis