How to remove a random element from a queue?
843789Apr 24 2009 — edited Apr 25 2009Hi,
I am new to Java programming...Please help me with this :
I have created an object of Queue class in java..Now i wanna remove any random element from the queue by iterating through all its elements...I was unable to find any q.next() method in the documentation and i am not sure whether it is possible to remove any random positioned element from the queue or its just the first element that would be deleted every time?
How can i remove a random positioned element in a queue object?
Please help me out..
Thanks !