Ask Question
18 February, 09:12

The java class library interface queue method tagg retrieves the entey at the front of a queue but themrows a NosuchElementException if the queue was empty is

A. poke

B. empty

C. look

D. peek

+1
Answers (1)
  1. 18 February, 09:38
    0
    Answer:D) peek

    Explanation:Peek operation or function is the method that is used for the returning of the values on the front of the queue or stack type datatypes. This operation function over those datatypes having group or collection of the elements and does not eliminate any element from the queue.

    NOsuchElemnet exception is shown when there is the peek operation in the queue for the element to be displayed on the top and no deletion can take place. Thus, the correct option is option (D).
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “The java class library interface queue method tagg retrieves the entey at the front of a queue but themrows a NosuchElementException if the ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers