title: Java Syntax for a list of comparable objects
body: <p>I'm writing a method that takes as its only parameter a list of comparable objects and doesn't return anything. I am uncertain as to the syntax that it should have:</p>
  
  <pre><code>public static void methodName(List&lt;Comparable&lt;Object&gt;&gt; list) {
      // Do some stuff
  }
  </code></pre>
  
  <p>I think this is wrong because of the <code>&lt;Object&gt;</code> as a type for Comparable, which would mean the list can take an Integer and a Boolean as objects, but I don't want that. I want the list to take only one type, but that type has to implement the Comparable interface. How do I achieve that?</p>