title: Wildcards with diamond operator
body: <p>If I am trying to do something like this :</p>
  
  <pre><code>List&lt;?&gt; unknownList = new ArrayList&lt;&gt;();
  </code></pre>
  
  <p>then the code compiles and runs fine, but <strong>of which type</strong> the <code>ArrayList</code> has created?</p>
  
  <p>and after this line, If I have done like this :</p>
  
  <pre><code>        unknownList.add("str"); //compilation error
  </code></pre>
  
  <p>It gives compilation error :</p>
  
  <pre><code>error: no suitable method found for add(String)
          unList.add("str");
                ^
  method List.add(int,CAP#1) is not applicable
    (actual and formal argument lists differ in length)
  method List.add(CAP#1) is not applicable
    (actual argument String cannot be converted to CAP#1 by method invocation conversion)
  method Collection.add(CAP#1) is not applicable
    (actual argument String cannot be converted to CAP#1 by method invocation conversion)
  where CAP#1 is a fresh type-variable:
      CAP#1 extends Object from capture of ?
  </code></pre>
  
  <p>What is this error, and <strong>is it good to use the diamond-operator with wildcards? If YES then WHERE???</strong></p>