I have the attached code fragment. The for loop takes long time to execute when the List is huge (the list can have thousands or may be tens of thousands of objects) and I want to optimize it. Specifically, I want to use a char array (or any other better idea?) instead of String “person?? so that I can use charAt instead of substring.
If you are aware of any better idea than using char array, please feel free to suggest.
I need the ASAP. I want someone to post a bid and do the modifications immediately after I accept the bid.