title: Storing an Iterator Reference
body: <p>I have a Linked List that holds contact information(name, date of birth, etc...). I add the contacts in the list into the <em>List</em>. I want to use the iterator to go through the list so that I can access all the contacts' information. This is where I have the problem. I use a <em>Next</em> button to access all the contacts' information but I am doing it using indexes which increment every time I press Next. I don't want to do it using increments but rather with iterator. When I use the iterator I try to save the reference but I think i'm doing it wrong.  </p>
  
  <pre><code>btnNext.addActionListener(new ActionListener() {
  
          private ContactList save;
  
  public void actionPerformed(ActionEvent arg0) {
  
  Iterator&lt;ContactList&gt; iterator = list.iterator();
  
  if(iterator.hasNext())
  {
  save = itr.next();
  name.setText(save.firstName);
  lastName.setText(save.lastName);
  dob.setText(save.dob);
  homeNum.setText(save.homeNum);
  cellNum.setText(save.cellNum);
              }
   }
   }};
  </code></pre>
  
  <p>I Know that this code only gets the first contact from the list. I want the code to get the next contact if the button is also pressed but i know that since the iterator is in the action handling that it doesn't save the itr.next(), if i try to move the iterator and put it with the other fields then I get a ConcurrentModualError. Any help would be appreciated.</p>