posted 11 years ago
PriorityQueueMethods.java: error: cannot infer type arguments for PriorityQueue<>;
Queue<Integer> intQueue=new PriorityQueue<>(5,rs);
^
reason: no instance(s) of type variable(s) E exist so that PriorityQueue<E> conforms to Queue<Integer>
where E is a type-variable:
E extends Object declared in class PriorityQueue
1 error
My one regret in life is that I am not someone else.
- Woody Allen