Java Generics at method level
<p>Can anyone please explain me below code </p>

<pre><code> public &lt;T extends Emp&gt; void foo(ArrayList&lt;T&gt; list) {
    list.add(list.remove(0)); // (cycle front element to the back)
}
</code></pre>

<p>I am trying to understand how Generics will apply on void return type.
Note: i have changed the code now it is not giving any error. </p>