It would be easier if you put the account number and account into a
Map, but that probably isn't a viable option at present. You are going to have to sort the array and do a binary search, or a linear search. The latter is easier; you simply use a for loop; I suggest you have a
boolean called
found or similar
. . . then you can break out of the loop at the appropriate moment. Obviously I'm not giving you any more code.
A binary search is much faster than linear, except in very small arrays, but it only works if you sort the array beforehand.