title: Java - initiate generic variable with no generic type;
body: <p>Could you please explain the difference between these declarations : </p>
  
  <pre><code>List&lt;Number&gt; test = new ArrayList&lt;Number&gt;();
  List&lt;Number&gt; test1 = new ArrayList();
  test.add(new Integer(10));
  test1.add(new Integer(10));
  //test.add(new Object());
  //test1.add(new Object());
  </code></pre>
  
  <p>The first 2 invocation of add method work fine, the last 2 fail.
  Is there anything else, except compile warning at the second initialization ?</p>
  
  <p>Do I understand correct that compile time type safety is based on variable type (and not the referenced object type)?</p>
  
  <p>Thank you in advance.</p>