title: Compile Error on Java 7 Diamond Operator: ArrayList<>();
body: <p>I have this line of code: </p>
  
  <pre><code>List&lt;IObserver&lt;?&gt;&gt; observers = new ArrayList&lt;&gt;();
  </code></pre>
  
  <p>and get the 3 following Errors:</p>
  
  <pre><code>Cannot instantiate the type ArrayList&lt;?&gt;
  Syntax error on token "&lt;", ? expected after this token
  Type mismatch: cannot convert from ArrayList&lt;?&gt; to List&lt;IObserver&lt;?&gt;&gt;
  </code></pre>
  
  <p>I am using Eclipse 3.7, I installed JDK 7 update 5 and the Project is set to use the JRE System Library[JavaSE1.7] in the Build Path.</p>
  
  <p>Passing in the <code>IObserver&lt;?&gt;</code> on the right side compiles fine, but I have to use the diamond operator.</p>
  
  <p>I think this is a configuration problem, but I can't figure out what I have missed.</p>