title: What is the difference between '&' and ',' in Java generics?
body: <p>While reading the Java official tutorial about generics, I found that you can restrict the type argument (in this case is <code>T</code>) to extend a class and/or more interfaces with the 'and' operator (<code>&amp;</code>) like this:</p>
  
  <pre><code>&lt;T extends MyClass &amp; Serializable&gt;
  </code></pre>
  
  <p>I replaced the <code>&amp;</code> with <code>,</code> (by mistake and still works, with a minor warning).</p>
  
  <p>My question is, is there any difference between these two:</p>
  
  <pre><code>&lt;T extends MyClass &amp; Serializable&gt;
  &lt;T extends MyClass , Serializable&gt; // here is with comma
  </code></pre>
  
  <p>And the example method:</p>
  
  <pre><code>static &lt;T extends MyClass &amp; Serializable&gt; ArrayList&lt;T&gt; fromArrayToCollection(T[] a) {
      ArrayList&lt;T&gt; arr = new ArrayList&lt;T&gt;();
  
      for (T o : a) {
          arr.add(o); // Correct
      }
      return arr;
  }
  </code></pre>