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
Implement your queue as a LinkedList. Then you can iterate over your objects in order they were inserted. You have to declare the type of object being insert into the queue so you won't get any errors. You can keep it as object and specify it as a queue of objects then your code above would work. See below.
Queue