posted 16 years ago
Hello,
Priority Queue when we not use a Comparator uses the natural order, by natuaral order it means the Comparable the class implements, so Integer implements his comparable, and it is:
So the result is ok, take a look on this commented code:
I hope it helps.
Kind Regards,
Raphael Rabadan