title: What does <> do in Java?
body: <p>I know if you want a list (for example) you create it like:</p>
  
  <pre><code>List&lt;String&gt;
  </code></pre>
  
  <p>If you want to create a generic type of list you could do it like:</p>
  
  <pre><code>MyList&lt;T&gt;
  </code></pre>
  
  <p>So is the only thing &lt;> does is to couple an object with a container or list? Does it have other uses? What does it actually do?
  Was reading on another post how putting static methods in generic types is a bad thing for type safety, so is this bad code?</p>
  
  <pre><code>public class LinkList&lt;T&gt; {
  
  private final T t;
  private final LinkList&lt;T&gt; next;
  
  public LinkList(T t, LinkList&lt;T&gt; next){
      this.t = t;
  
      this.next = next;
  }
  // Creates list from array of T
  public static &lt;T&gt; LinkList&lt;T&gt; getList(T[] t){
      if(t == null){
          return null;
      }
      LinkList linkList = null;
      for(int i = t.length-1; i &gt;= 0; i--){
          linkList = new LinkList(t[i], linkList);
      }
      return linkList;
  }
  
  public T element() {
      return t;
  }
  
  public LinkList&lt;T&gt; getNext() {
      return next;
  }
  </code></pre>
  
  <p>}</p>