Question: Question 8 1 pts Given the following code segment, what are the contents of the queue front to back (left to right)? Queuelnterface MyLine =

Question 8 1 pts Given the following code segment, what are the contents of the queue front to back (left to right)? Queuelnterface MyLine = new LinkedQueue(); MyLine .enqueue("John"); MyLine .enqueue("Matthew"); String next = MyLine.dequeue(); MyLine .enqueue("Drew"); MyLine .enqueue("Heather"); MyLine .enqueue("David"); next = MyLine.dequeue(); O David, Heather, Drew John, David, Drew O Drew, Heather, David O John, Matthew, Drew Question 9 1 pts The dequeue method an entry. O removes adds puts inserts Question 10 1 pts The dequeue method: throws an exception if the queue is empty returns the item at the front of the queue O removes the item at the front of the queue O all of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
