title: java basic: the Template can only accept one dimension change why?
body: <p>I declare the private variable as</p>
  
  <pre><code>private List&lt;MultipartFile&gt; files;
  </code></pre>
  
  <p>When I want initialize it I do in this way:</p>
  
  <pre><code>files=new ArrayList&lt;CommonsMultipartFile&gt;();
  </code></pre>
  
  <p>you can see the CommonsMultipartFile extends the MultipartFile Interface
  The compile give me error as:</p>
  
  <pre><code>Type mismatch: cannot convert from ArrayList&lt;CommonsMultipartFile&gt; to List&lt;MultipartFile&gt;
  </code></pre>
  
  <p>Anyone who know the reason? 
  If I really want to Stable the collection and inside class type, how can I do it? 
  Can I do similar staff in C++? </p>