Quiz

Question 1 of 5. 0 correct, 0 incorrect.

A Java PriorityQueue<Integer> has 5, 1 and 3 added in that order, and a for-each loop prints every item. What does the loop print?

Hint

A for-each loop walks the array inside the queue. Is that array sorted, or only a heap?