krissyyyyyy7594 krissyyyyyy7594
  • 22-08-2019
  • Computers and Technology
contestada

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

Respuesta :

Cetacea
Cetacea Cetacea
  • 28-08-2019

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).

Answer Link

Otras preguntas

a population of rabbits triples every month the population starts with two rabbits how many rabbits are there in 3 months?
Choose the answer. Which best explains how the third-person point of view in "The Piece of String" affects the resolution of the conflict? A: It makes the reade
Describe how to use a tens fact to find the difference for 15-8.
100 POINTS AND BRAINIEST FOR THE RIGHT ANSWER In “Star Food” Dade’s father and mother expect very different things from him. As a result, Dade is often unsure h
How does a cells shape help it perform?
Look at the pattern what is the missing number 400 425 _ 475
What does pile mean in
what analogy best represents the relationship between jobs and careers?
Please answer the problem below. ~Thanks = )
Dua buah vektor, yaitu P= 6i-5j+2k dan Q = 2i+2j+8k. Tentukan vektor R agar P-Q+R=0. Hitung pula besar vektor R?