title: Overloading constructor with a generic type in java
body: <p>Here is the code:</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.List;
  
  /**
   * Created by IDEA on 15/11/14.
   */
  public class Matrix&lt;T&gt; {
      private final int nrow;
      private final int ncol;
  
      Matrix(List&lt;List&lt;T&gt;&gt; data) {
          nrow = data.size();
          ncol = data.get(0).size();
      }
  
      Matrix(List&lt;T[]&gt; data) {
          nrow = data.size();
          ncol = data.get(0).length;
      }
  }
  </code></pre>
  
  <p>The IDE asks me to delete the first constructor, why?</p>