title: Remove Object from ArrayList based on User Input
body: <p>I have an object that looks like this:</p>
  
  <pre><code>Account account = new Account (0, fName, sName, adr, city, pos, uniqueID);
  </code></pre>
  
  <p>I then put that object, via user input, to an ArrayList: </p>
  
  <pre><code>List&lt;Account&gt; newAcc = new ArrayList&lt;Account&gt;();
  </code></pre>
  
  <p>Here's the problem. I need a slick way to remove that object based on user input. This is what I've tried:</p>
  
  <pre><code>System.out.print("1. Client with Accounts.\n2. Client with Savings Accounts.\n3. Remove all Accounts.\n");
  int inputRmv = in.nextInt();
  
  case 1:
      for (Iterator i = newAcc.iterator(); i.hasNext(); ) {
          if (i.equals(rmvID)) {
              newAcc.remove(i);
  </code></pre>
  
  <hr>
  
  <p>This doesn't work. The object isn't removed this way. </p>
  
  <p>Basically: is there a way to use user input and then iterate through the list to see if any object contains a string equivalent to any part of the object?</p>
  
  <p>I am in dire need, so any help to send me in the right direction is immensely appreciated!</p>
  
  <p>Cheers.</p>