1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
valina [46]
3 years ago
6

The java class library interface queue method tagg retrieves the entey at the front of a queue but themrows a NosuchElementExcep

tion if the queue was empty is
A.poke

B.empty

C.look

D.peek
Computers and Technology
1 answer:
SCORPION-xisa [38]3 years ago
5 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).

You might be interested in
Which of the following are characteristics of a good webmail message select all that apply
emmainna [20.7K]

add choices please :)


6 0
3 years ago
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
sdas [7]

Answer:

The modified program in Python is as follows:

import math

paint_colors = {'red': 35,'blue': 25,'green': 23}

wall_height = int(input('Enter wall height (feet):\n'))

wall_width = int(input('Enter wall width (feet):\n'))

area = wall_height*wall_width

print('Wall area:',area,'square feet')

paint_needed = area/350.0

print('Paint needed: {:.2f} gallons'.format(paint_needed))

print('Cans needed:',round(paint_needed),'can(s)')

color = input("Choose a color to paint the wall: ")

print("Cost of purchasing", color, "paint: $",paint_colors[color])

Explanation:

The italicized are given from the question [unchanged]

<em>import math</em>

<em> paint_colors = {'red': 35,'blue': 25,'green': 23} </em>

<em>wall_height = int(input('Enter wall height (feet):\n')) </em>

This gets input for width

wall_width = int(input('Enter wall width (feet):\n'))

Calculate the wall area

area = wall_height*wall_width

Print the calculated wall area

print('Wall area:',area,'square feet')

Calculate the amount of paint needed

paint_needed = area/350.0

Print the amount of paint needed to 2 decimal places

print('Paint needed: {:.2f} gallons'.format(paint_needed))

Print the amount of can needed to nearest integer

print('Cans needed:',round(paint_needed),'can(s)')

Prompt user for color of paint [here, we assume the user input is correct]

color = input("Choose a color to paint the wall: ")

Prints the corresponding amount for the color

print("Cost of purchasing", color, "paint: $",paint_colors[color])

3 0
2 years ago
If the Snort IDS captures the IP packets off the LAN segment for examination, is this an example of promiscuous mode operation
vodomira [7]

Answer:

i now why read this

Explanation:

We're no strangers to love

You know the rules and so do I

A full commitment's what I'm thinking of

You wouldn't get this from any other guy

I just wanna tell you how I'm feeling

Gotta make you understand

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

Never gonna tell a lie and hurt you

We've known each other for so long

Your heart's been aching but you're too shy to say it

Inside we both know what's been going on

We know the game and we're gonna play it

And if you ask me how I'm feeling

Don't tell me you're too blind to see

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

Never gonna tell a lie and hurt you

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

Never gonna tell a lie and hurt you

(Give you up)

(Ooh) Never gonna give, never gonna give

(Give you up)

We've known each other for so long

Your heart's been aching but you're too shy to say it

Inside we both know what's been going on

We know the game and we're gonna play it

I just wanna tell you how I'm feeling

Gotta make you understand

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

Never gonna tell a lie and hurt you

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

Never gonna tell a lie and hurt you

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

5 0
3 years ago
What is the purpose of the fit to size feature in Word?
Olegator [25]

Answer : computer

Explanation:

please mark me as brilliant

3 0
2 years ago
How do we benefit from this increased interconnectivity?
ankoles [38]
Well we just benefit from it like it just helps as I guess
8 0
2 years ago
Other questions:
  • What three components make up a film camera?
    14·2 answers
  • Which shortcut brings up the Print screen?
    10·2 answers
  • What is the internet?
    5·2 answers
  • For question 1-3, consider the following program: def tryIt(a ,b = 7) return a + b
    8·1 answer
  • This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by
    8·1 answer
  • How do emotions affect purchasing decisions?
    6·1 answer
  • According to social penetration theory, the __________ dimension concerns the number of topics disclosed whereas the __________
    6·1 answer
  • Who know's web Design
    12·1 answer
  • What does the word collaborative mean?
    13·2 answers
  • The best way to deal with crying children in the car is to ignore them or pull off the road
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!