title: Modifying a method so the arguments can be any type that implements Comparable
body: <p>I would like to modify the following method so its arguments can be of any type that implements the <code>Comparable</code> interface. The method’s return type should be the same as the type of its parameter variables.</p>
  
  <pre><code>public static int max(int a, int b) {   
      if (a &gt;b) 
          return a;  
      else 
          return b;
  }
  </code></pre>
  
  <p>So in modifying it, I could just use <code>&lt;T extends Comparable&lt;T&gt;&gt;</code>, but how would I go about making the return types the same?</p>