title: Is primitive int also a Comparable?
body: <p>I just came across a Java generics tutorial that seems to use primitive int, float, etc. as objects that extend Comparable</p>
  
  <pre><code>    public class MaximumTest {
     // determines the largest of three Comparable objects
  
     public static &lt;T extends Comparable&lt;T&gt;&gt; T maximum(T x, T y, T z) {
        T max = x;   // assume x is initially the largest
  
        if(y.compareTo(max) &gt; 0) {
           max = y;   // y is the largest so far
        }
  
        if(z.compareTo(max) &gt; 0) {
           max = z;   // z is the largest now                 
        }
        return max;   // returns the largest object   
     }
  
     public static void main(String args[]) {
        System.out.printf("Max of %d, %d and %d is %d\n\n", 
           3, 4, 5, maximum( 3, 4, 5 ));
  
        System.out.printf("Max of %.1f,%.1f and %.1f is %.1f\n\n",
           6.6, 8.8, 7.7, maximum( 6.6, 8.8, 7.7 ));
  
        System.out.printf("Max of %s, %s and %s is %s\n","pear",
           "apple", "orange", maximum("pear", "apple", "orange"));
     }
  }
  </code></pre>
  
  <p>Can primitive be a Comparable object somehow?</p>