How does Priority Queue work. This is my scenario, I have certain objects with priorities 1,2,..10. There could be multiple objects with same priority. I was thinking I can put them into a priority queue and let the pool() give me the objects with highest priority.. ?
I m kinda confused with PQ.
1) I get errors when i create a PQ <MyClass>.
2) Do i need to use comparator to ensure i check the priority of the object?
Pointers plz
Thanks
Pushkala