title: Storing information in java
body: <p>I want to store information, String username, String password and String loginType.</p>
  
  <p>When a login is attempted, I want to find if the username exists, then verify the password and return the loginType.</p>
  
  <p>What is the best type of collection for storing this? </p>
  
  <p>What i need to be able to do is --> When i try to add details I first must check if the username is already there. If there is no match, my details will save, if the username already exists the data wont save.</p>
  
  <p>I also need to search. I want to be able to find the username. and then verify if i have a password match and return the type</p>
  
  <p>The order of these items does not matter. </p>
  
  <p>What is the best type of collection for storing this?  </p>