title: passing a map into another method to be modified in java
body: <p>So I came across some code that I thought looked kind of strange. Wanted to see what some of your opinions are of this</p>
  
  <pre><code>public class Test {
  
     public static void main(String[] args) {
  
        HashMap m = new HashMap();
        Test2 t2 = new Test2();
        t2.fill(m);
     }
  }
  
  public class Test2 {
  
      public void fill(HashMap m) {
          m.put(new Integer(0), new Integer(0));
      }
  
  }
  </code></pre>
  
  <p>So is this code OK or should it be done another way?</p>
  
  <p>Thanks</p>