title: store X and Y coordinates
body: <p>Hi im new to this site and need help with a program im working on. the problem im having is that i cant seem to store string and two integers (as the coordinates). i have looked at other code but dont see how the values are stored. below is the code ive been using. the code seems to be fine but when trying to stored the values i cant put multiply integers. thanks for your time </p>
  
  <pre><code>import java.util.HashMap;
  public class map {
  
      class Coords {
          int x;
          int y;
  
          public boolean equals(Object o) {
              Coords c = (Coords) o;
              return c.x == x &amp;&amp; c.y == y;
          }
  
          public Coords(int x, int y) {
              super();
              this.x = x;
              this.y = y;
          }
  
          public int hashCode() {
              return new Integer(x + "0" + y);
          }
      }
  
      public static void main(String args[]) {
  
          HashMap&lt;Coords, Character&gt; map = new HashMap&lt;Coords, Character&gt;();
          map.put(new coords(65, 72), "Dan");
      }
  
  }
  </code></pre>