J2EE_Life wrote:Neither is significantly faster than the other.
Can anyone please helpme with :
WHich is better in terms of faster execution Array or ArrayList?
tags so it is properly formatted and the forum doesn't try to interpret special characters. Still it triggered me to check something else out: how does using an Iterator compare to simply looping over the list index based like you do here. A lot it turned out: an Iterator is an order of a magnitude slower.