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
Assignment 2: room area <br>programming python in Project Stem​
White raven [17]

Answer:I love Python, very useful

Explanation:python is very easy and user friendly!

8 0
3 years ago
Select the correct answer.
ioda

Answer: D

Explanation:

6 0
3 years ago
Read 2 more answers
What is a segmentation?
lana66690 [7]

Answer:

Segmentation means to divide the marketplace into parts, or segments, which are definable, accessible, actionable, and profitable

3 0
2 years ago
A bike share program in Indianapolis allows customers to borrow a bike and charge them based on the length of their ride.
REY [17]

Answer:

public static double calculate_fee(int lengthofRide, String membership){

       double fee = 0.0;

       if(membership.equalsIgnoreCase("daily")){

           fee = 1.50 +(lengthofRide*20);

       }

       else if (membership.equalsIgnoreCase("annually")){

           fee = 1.0+(lengthofRide*15);

       }

       return fee;

   }

Explanation:

The solution is implemented in Java. The complete code prompting the user to enter ride duration and membership type is given below:

import java.util.Scanner;

public class num4 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter your membership \"daily\" of \"annually\"");

       String membership = in.nextLine();

       System.out.println("Enter your ride duration in minutes");

       int rideTime = in.nextInt();

       //calling the method calculate_fee

       System.out.println("Your total fee based on your membership is "+calculate_fee(rideTime,membership));

   }

   public static double calculate_fee(int lengthofRide, String membership){

       double fee = 0.0;

       if(membership.equalsIgnoreCase("daily")){

           fee = 1.50 +(lengthofRide*20);

       }

       else if (membership.equalsIgnoreCase("annually")){

           fee = 1.0+(lengthofRide*15);

       }

       return fee;

   }

}

4 0
3 years ago
Which of the following criterion expressions searches for PhoneNumber records where the phone number contains 10 characters and
Kay [80]

Answer:

A) Like "9?????????"

Explanation:

Required

10 characters and starts with 9

<em>The options relate to queries in Microsoft Access; so, I will answer the question from the perspective of Microsoft Access.</em>

First, the query will use the like statement because the query is to make comparison.

Next; for the search query to return exact 10 characters, the syntax is "??????????"

Lastly, for the search query to begin with 9, the first ? will be replaced with 9.

So, we have: "9?????????"

<em>Hence, (a) is correct</em>

6 0
3 years ago
Other questions:
  • _____________ is the characteristic of a resource that ensures that access is restricted to only permitted users, applications,
    14·1 answer
  • how much should an organization consider moving into the cloud before full outsourcing starts making more business sense
    14·2 answers
  • Which behavior could be acceptable at a classical concert as well as at a ball game? standing for an exceptional performance che
    9·2 answers
  • Read each statement below. If the statement describes a peer-to-peer network, put a P next to it. If the statement describes a s
    13·2 answers
  • 2. What's the keyboard command that will allow you to "copy" text?
    8·2 answers
  • The development of a new information system is economically justified if the _____.
    5·2 answers
  • Plain text and ASCII text are the same thing. true or false
    12·1 answer
  • Male tiene una bicicleta rosa<br>es biene o es servicio?​
    5·1 answer
  • Why people shouldnt get married​
    6·1 answer
  • Four examples of computer virus​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!