title: Removing an item from a list using ListIterator
body: <p>code:</p>
  
  <pre><code> Random Picker = new Random();
   List&lt;String&gt; list = new ArrayList&lt;String&gt;();
    list.add("card1");
    list.add("card2");
    list.add("card3");
  
  
    ListIterator listIterator = list.listIterator();
    String c1, c2, c3;
    c1 = list.get(Picker.nextInt(list.size()));
    listIterator.remove();
  </code></pre>
  
  <p>When doing this I get a java error. What I am trying to do is set c1 to <code>list.get(Picker.nextInt(list.size()));</code>
  and then remove the picked card from the list. In other words, I want the String c1 to randomly pick from the list, and then for the card it picked to be removed from the list, but to stay in the value c1. I would imagine my current code doesn't work because when I remove what it picked, it also removes the card from the string c1. I don't know how to do this correctly.</p>