title: Efficient way to get/remove first element from the list?
body: <p>I want to take out and remove first element from the List. I can see, I have two options:</p>
  
  <p><strong>First Approach:</strong></p>
  
  <pre><code>LinkedList&lt;String&gt; servers = new LinkedList&lt;String&gt;();
  ....
  String firstServerName = servers.removeFirst();
  </code></pre>
  
  <p><strong>Second Approach</strong></p>
  
  <pre><code>ArrayList&lt;String&gt; servers = new ArrayList&lt;String&gt;();
  ....
  String firstServerName = servers.remove(0);
  </code></pre>
  
  <p>I have lot of elements in my list.</p>
  
  <ul>
  <li>Is there any preference which one we should use? </li>
  <li>And what is the difference between the above two? Are they technically same thing in terms of performance? What is the complexity involve here if we have lot of elements?</li>
  </ul>
  
  <p>What is the most efficient way to do this.</p>