title: Lazy parameter type in Java?
body: <p>i have a question about parameter passing in Java. Let's say i have a method:</p>
  
  <pre><code>public void x(Object o)
  </code></pre>
  
  <p>Let's say i call x(3) and x("abc"). x(3) will take a little bit more time because a new Integer is constructed, since 3 is not an Object. Assuming i can't change the method calls, only the method implementation (and parameter type), is there a way to prevent this Integer construction until some point in the method x where i know it's really needed?</p>
  
  <p>Thanks,
  Teo</p>