The order of removing from a queue

Report a typo

Select the order of removing elements from the queue q according to the following code.

Queue<Integer> q = new ArrayDeque<>();

q.offer(10);
q.offer(20);
q.offer(5);
q.offer(6);

while (!q.isEmpty()) {
    q.poll();
}
Select one option from the list
___

Create a free account to access the full topic