title: Why can't I add to a List<? extends String> in Java?
body: <p>In the snippet below, adding "Hulooo" to the list generates a compiler error since String doesnt extend String.
  However, typecasting an ArrayList of strings works. But typecasting an ArrayList of objects doesn't work.</p>
  
  <p>Can someone explain why this is happening?
  What applies to String(in this context) that doesn't apply to Object?</p>
  
  <pre><code>public static void takeList(List&lt;? extends String&gt; list)
  {
      list.add("Hulloo");//ERROR
      list=new ArrayList&lt;String&gt;();
      list=new ArrayList&lt;Object&gt;();//ERROR
  }
  </code></pre>