Suppose I have an ArrayList of my custom Objects which is very simple. For example:
ArrayList
class Account { public String Name; public In
A better way to do this would be to use a Map.
In your case, you could implement it in the following way
Map
you can use the "get" method to retrieve the appropriate account object.
accountMap.get(id);