• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

priority q

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PriorityQueue<Integer> p=new PriorityQueue<Integer>(???,pqs);

The above line is taken from a program, where pqs represents the object of a comparator. but i do not know what is the first argument there. actually it is given as
PriorityQueue<Integer> p=new PriorityQueue<Integer>(10,pqs);
please explain..
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here
http://java.sun.com/javase/6/docs/api/java/util/PriorityQueue.html
you can find the constructors of PriorityQueue with descriptions.
The argument your question is about is the initial capacity
of the priority queue.
 
reply
    Bookmark Topic Watch Topic
  • New Topic