Wouter Oet wrote:
He does that at line 7.Dhruva Mistry wrote:i believe youi first need to initialize tum[] object with some values
Yup my doubt is that in the program flow gc() has finalize method in it but why id finalize method of string class called because in this case string class is not child class but still why string class finalize() method called
Ankit Garg wrote:When you display a PriorityQueue directly or using iterator, the ordering of elements is not guaranteed. The natural ordering is only guaranteed for peek and offer methods. Checkout the javadocs for PriorityQueue class, you'll get your answer...