title: Java: Generics syntax
body: <p>This works to return a list of ints:</p>
  
  <pre><code>public List&lt;Integer&gt; GetIListImpl() {
      return new ArrayList&lt;Integer&gt;();
  }
  </code></pre>
  
  <p>But what if I want to let the caller specify the generic type? Something like this, although syntactically I'm not sure how to do it:</p>
  
  <pre><code>public List&lt;T&gt; GetIListImpl&lt;T&gt;() {
      return new ArrayList&lt;T&gt;();
  }
  </code></pre>
  
  <p>The usage would be:</p>
  
  <pre><code>    List&lt;String&gt; = GetIListImpl&lt;String&gt;();
  </code></pre>