Custom order of priority queue
807607Oct 31 2006 — edited Oct 31 2006I am a novice in Java. I intend to use a priority queue which holds objects. The objects have a string and two integers. I have to order the priority queue based on one of the integer.
I write syntax according to my understanding please correct me.
PriorityQueue<Object> pr = new PriorityQueue<Object>();
comparable(){
sort(Object.int2)// this is the place where I am confused
}