title: How do I use collection literals in Java 7?
body: <p>I've tried the following line:</p>
  
  <pre><code>Map&lt;Character, Color&gt; map={new Character('r'):Color.red,new Character('b'):Color.black};
  </code></pre>
  
  <p>But Netbeans 7 rejects this, with the error message <code>'{' expected, ';' expected</code>.</p>
  
  <p>I've set the Source/Binary format as 'JDK 7'and the platform to 'JDK 1.7', is there anything else I need to do?</p>