title: Extending comparables with java generics and interfaces
body: <p>So I'm creating an implementation of a priority queue using generics. I have this interface which I am trying to implement in my PriorityQueue class:</p>
  
  <pre><code>public interface PriorityQueueInterface&lt;Item extends Comparable&lt;Item&gt;&gt; { }
  </code></pre>
  
  <p>but I'm not sure what the proper syntax is to correctly implement the PriorityQueueInterface. Here is what I currently have:</p>
  
  <pre><code>public class PriorityQueue&lt;Item extends Comparable&lt;Item&gt;&gt; implements PriorityQueueInterface&lt;Item extends Comparable&lt;Item&gt;&gt;{ }
  </code></pre>
  
  <p>but it's throwing multiple errors. What would be the correct way to implement the interface? Any help would be appreciated.</p>