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 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();
}Create a free account to access the full topic