wood burning stoves 2.0*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 36599
    
  16
And what was the mistake?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Queue compile error
 
Similar Threads
Regarding PriorityQueue
generics doubt from nikos
Reverse Sort
Priority Queue Ordering
Print contents of PriorityQueue not working