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:
public interface PriorityQueueInterface<Item extends Comparable<Item>> { } but I'm not sure what the proper syntax is to correctly implement the PriorityQueueInterface. Here is what I currently have:
public class PriorityQueue<Item extends Comparable<Item>> implements PriorityQueueInterface<Item extends Comparable<Item>>{ } but it's throwing multiple errors. What would be the correct way to implement the interface? Any help would be appreciated.
<Item extends Comparable<? super Item>>