title: Java - remove last known item from ArrayList
body: <p>OK, so here is my <code>ArrayList</code>:</p>
  
  <pre><code>private List&lt;ClientThread&gt; clients = new ArrayList&lt;ClientThread&gt;();
  </code></pre>
  
  <p>and here is what I am trying to do:<br>
  I am trying to remove the last known item from the <code>ArrayList</code> I posted above. I'm trying to do this with the code below:</p>
  
  <pre><code>    } catch(SocketException re) {
  
  
                              String hey = clients.get(clients.size());
                              ClientThread.remove(hey);
                              System.out.println(hey + " has logged out.");
                              System.out.println("CONNECTED PLAYERS: " + clients.size());
  }
  </code></pre>
  
  <p>but I am getting this error:</p>
  
  <pre><code>C:\wamp\www\mystikrpg\Server.java:147: incompatible types
  found   : Server.ClientThread
  required: java.lang.String
                          String hey = clients.get(clients.size());
                                                  ^
  C:\wamp\www\mystikrpg\Server.java:148: cannot find symbol
  symbol  : method remove(java.lang.String)
  location: class Server.ClientThread
                          ClientThread.remove(hey);
                                      ^
  2 errors
  </code></pre>
  
  <p>What am I doing wrong?
  It's supposed to remove the last known item from my <code>ArrayList</code>.</p>