• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Queue compile error

 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yea, i got my mistake.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47228
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what was the mistake?
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic