The following Integer values are pushed onto a stack, s. The values are pushed onto s in the order that they appear below (left to right). 1 7 4 6 10 9

Assume the following declaration has been made.
PriorityQueue priQue new PriorityQueuecinteger> :

Values are popped off the stack, s, and as each value is popped off the stack, it is inserted into the priority queue, priQue. The following code is then executed.

while (!priQueue.isEmpty()){
System.out.println (priQue.remove ())

The numbers printed to the screen would be:

Solved
Show answers

Ask an AI advisor a question