title: Generics and Parameterized Constructors
body: <p>This is an extension of this <a href="https://stackoverflow.com/questions/12130940/parameterized-methods-in-generic-class-type">previous question</a> about parameterized methods. I am reading the same book. After the example in the previous question, the author improves the </p>
  
  <pre><code>BinaryTree&lt;T extends Comparable&lt;? super T&gt;&gt;
  </code></pre>
  
  <p>class yet again (and he really does this time around) by adding the following constructor</p>
  
  <pre><code>public  &lt;E extends T&gt; BinaryTree(E[] items) {
      for(E item : items) {
          add(item);
  }
  </code></pre>
  
  <p>In the spirit of the previous question I tried this constructor instead:</p>
  
  <pre><code>public BinaryTree(T[] items) {
      for(T item : items) {
          add(item);
      }
  }
  </code></pre>
  
  <p>and the example code does not compile with my constructor:</p>
  
  <pre><code>public static void main(String[] args) {
      Manager[] managers = { new Manager("Jane", 1), new Manager("Joe", 3), new Manager("Freda", 3), new Manager("Bert", 2), new Manager("Ann", 2), new Manager("Dave", 2) };
      BinaryTree&lt;Person&gt; people = new BinaryTree&lt;&gt;(managers);
  }
  </code></pre>
  
  <p>What is this difference between changing the add() method in the previous question and changing this constructor? Why can't I pass a subtype of T in my constructor?</p>