title: How to call addition operator on two objects?
body: <p>In java, I have two <code>Object</code>s that addition (+) is supported on them, for example two <code>int</code>s or two <code>String</code>s. How I can write a function to really add them without specifying the types?</p>
  
  <p><strong>note:</strong> I don't want something like C++ function templates, as two operands are just <code>Object</code>s, i.e. I want to implement a function <code>add</code>:</p>
  
  <pre><code>Object add(Object a, Object b){
      // ?
  }
  </code></pre>
  
  <p>and then be able to do something like this:</p>
  
  <pre><code>Object a = 1, b = 2;
  Object c = add(a, b);
  </code></pre>