title: Can I have a method in JAVA with generic object parameter
body: <p>I have a method </p>
  
  <pre><code>public int addTransaction(Transactions tr){
    //etc...
  
  }
  </code></pre>
  
  <p>and now I want to create a new method, which will do exactly like <code>addTransaction</code> but it will take a different type object <code>Order order</code>.</p>
  
  <p>I realise that I can create this:</p>
  
  <pre><code>public int addTransaction(Order tr){
    //etc...
  
  }
  </code></pre>
  
  <p>However I was wondering if I can have one method with generic type inside the parenthesis so to pass whatever object I want. Can this be done?</p>