This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 37918
    
  22
And what was the mistake?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Queue compile error
 
Similar Threads
generics doubt from nikos
Reverse Sort
Priority Queue Ordering
Regarding PriorityQueue
Print contents of PriorityQueue not working