title: How do I call overloaded Java methods in Clojure
body: <p>For this example Java class:</p>
  
  <pre><code>package foo;
  public class TestInterop
  {   public String test(int i)
      { return "Test(int)"; }
  
      public String test(Object i)
      { return "Test(Object)"; }
  }
  </code></pre>
  
  <p>When I start Clojure and try to call the test(int) method, the test(Object) method is called instead, because Clojure automatically boxes the integer into a java.lang.Integer object.</p>
  
  <p>How do I force Clojure to call the test(int) method?</p>
  
  <pre><code>user=&gt; (.test (new foo.TestInterop) 10)
  "Test(Object)"
  </code></pre>
  
  <p>I want to call methods like <code>Component.add(Component comp, int index)</code> in AWT, but instead keep calling <code>add(Component comp, Object constraints)</code>, so the buttons on my toolbar always appear in the wrong order.</p>