title: Create Map in Java
body: <p>I'd like to create a <code>map</code> that contains entries consisting of <code>(int, Point2D)</code></p>
  
  <p>How can I do this in Java?</p>
  
  <p>I tried the following unsuccessfully.</p>
  
  <pre><code>HashMap hm = new HashMap();
  
  hm.put(1, new Point2D.Double(50, 50));
  </code></pre>