GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes Queue compile error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Queue compile error" Watch "Queue compile error" New topic
Author

Queue compile error

meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305


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
meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305

Yea, i got my mistake.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39044
    
  23
And what was the mistake?
 
GeeCON Prague 2014
 
subject: Queue compile error