title: Searching through Collections in Java
body: <p>I have a java properties file containing a key/value pair of country names and codes. I will load the contents of this file into a Collection like List or HashMap.</p>
  
  <p>Then, I want users to be able to search for a country, e.g if they type '<code>Aus</code>' in a textbox and click submit, then I want to search through the collection I have, containing a key/value pair of country codes/names (e.g AUS=>Australia), and return those countries which are found matching.</p>
  
  <p>Is there any more efficient way of doing this, other than looping through the elements of the collection and using <code>charAt()</code>?</p>