I have created a queue containing objects which I would like to iterate through in the order that they were placed within the queue (First object placed in queue, 2nd object placed in queue, 3rd object...)
I saw a way of doing this online but I'm not sure if this will guarantee that objects in the queue will be visited in the correct order?
for(MyObject anObject : queue){
//do someting to anObject...
Thank you for your help.