Java regarding <E> in public static <E> void
<p>Using Java:
I didn't want to waste peoples time and post this here, but my googling-skills have failed me and I can't find the answer. I was looking through some supplied code and they used</p>

<pre><code>public static &lt;E&gt; void printTree(TwoFourTree&lt;E&gt; tf)
</code></pre>

<p>(For reference we are converting from a Red-Black tree to a Two-Four Tree). When I first approached this problem I would use  instead of  and not even include  in the initial method declaration of <code>public static void</code>. However I ran into issues, and throwing in this <code>&lt;E&gt;</code> solved all my problems, despite using <code>&lt;Integer&gt;</code> instead of <code>&lt;E&gt;</code> everywhere else.</p>

<p>So my question is, can someone please explain to me what exactly the <code>&lt;E&gt;</code> does in</p>

<pre><code>public static &lt;E&gt; void
</code></pre>
