Java: remove a range of indices from a list
<p>Consider a linked list of strings I got from somewhere</p>

<pre><code>LinkedList&lt;String&gt; names = getNames();
</code></pre>

<p>Now, I want to remove the first <strong>k</strong> elements from the list. Currently, I'll do it this way:</p>

<pre><code>for (int i = 0 ; i &lt; k ; i++) {
    names.removeFirst();
}
</code></pre>

<p>Is there some way to do it more efficiently and to instead call something like:</p>

<pre><code>names.removeRange(0, k);
</code></pre>

<p>Note that I prefer not to construct a whole new list using <code>sublist()</code>, as for small <code>k</code> values, popping <code>k</code> times would be even more efficient than constructing the new list</p>