Which would be better List iterator or accessing through index?
i have doubt regarding the usage of iterator.We stores a list of values in a arraylist.Inorder to access it right now we are using list iterator and taking the values and comparing the values with the existing key. If there is a match with the key,then we are using that particular value.
The point is the arraylist contains dynamic data and the data might be in several thousands,but some how I could able to get the index of the value which exactly matches with key.
I compared both approach and I couldn't find any problem with it.
Since it is web application when the load increases,the performance is bit slow.
So I need a resolution for this..