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
zvonat [6]
3 years ago
14

Consider the following method, which is intended to return the index of the first negative integer in a given array of integers.

public int positionOfFirstNegative(int[] values) { int index = 0; while (values[index] >= 0) { index++; } return index; } What precondition is needed on the values array so that the method will work as intended?
Computers and Technology
1 answer:
Aleksandr [31]3 years ago
3 0

Answer:

The answer is "The array values must contain at least one negative integer".

Explanation:

In the above-given code, a method "positionOfFirstNegative" is declared, that accepts an array "values" as a parameter, inside the method an integer variable index is declared, that use in the while loop to check array value is greater than equal to 0, if the conditional is true it will increments the index value and return its value, that's why in this question array value include at least one negative value.

You might be interested in
A bakery collects data on sales. Each sales record includes the date of the sale and some metadata about the items that were par
professor190 [17]

Answer:

B. Which customer most frequently purchases bread.

Explanation:

As per the scenario, the data we are receiving from the sales record of the bakery is :

The date on which the items are sold

Each items name which are sold

The number of each item sold and

The price of each item sold  

These data are required to estimate how much the company has earned the profit during a given period of time.

So from the above scenario, there is no data given about the customer i.e customer name, customer number, etc. So there is no chance to track the details of a customer purchase history.

Therefore, the most appropriate answer is option B

6 0
3 years ago
What is an example of a source that is less likely to be copyrighted?
Ivahew [28]
An example would be a: motorized vehicle aka a car or a bike etc.
8 0
3 years ago
Read 2 more answers
I need ideas for a scratch (imagine, share, and program) coding project. You can think of any project you'd like thanks! :)
alex41 [277]

You did not include enough information.

5 0
3 years ago
Read 2 more answers
Complete the statement about WYSIWYG editors when you use a WYSIWYG editor you typically specify the continent and blank A.layou
erastovalidia [21]

Answer:

When you use a WYSIWYG editor you typically specify the content and layout while the editor generates the HTML code

Explanation:

Required

Complete the blanks

In WYSIWYG, the user of the application provides contents to the WYSIWYG software and also designs the appearance; The appearance is referred to as the layout.

Throughout the design, the user will not use HTML codes; it is the duty of the WYSIWYG editor to generate HTML code based on the input designs by the user.

6 0
3 years ago
Eric is adding three more slides to his PowerPoint presentation. He knows he wants one of them to have only a large text box, th
marissa [1.9K]

The buttons depend on what version of MS Office he is using. Assuming Eric is using Powerpoint 2013, he must press the following: 

1st Slide: Insert > New Slide > Title Only

2nd Slide: Insert > New Slide > Comparison > Click on "Pictures" icon > Browse > Click selected picture > Insert > Delete text box saying "Click to add title" > Insert another picture using same procedures above > Add captions

3rd slide: Insert > New Slide > Two Content > <span>Click on "Picture" icon > Browse > Click selected picture > Insert 3 more pictures > Click textbox "Click to add title" </span>

3 0
3 years ago
Other questions:
  • What's the code?
    6·1 answer
  • A typical serial cable has
    13·1 answer
  • A company gives you a document to review. This document lays out the strengths and weaknesses of a proposed business venture. It
    13·1 answer
  • Can a spreadsheet be filtered only by one column at a time?
    11·1 answer
  • If you cause a car accident, which type of insurance will require you to pay the least out of pocket?
    5·2 answers
  • Match each type of software license with the appropriate definition.
    11·1 answer
  • Joe, a user, has purchased a new mobile device that uses a different OS than his previous one. Joe wants to copy his contacts an
    10·1 answer
  • Write a for loop that runs 5 times and accepts the input of an integer number every time. Those numbers will be accumulated by a
    7·1 answer
  • Tyra is peer conferencing about her project with a friend. Tyra's friend provided feedback that Tyra does not agree with. What s
    6·1 answer
  • WHO WANT P O I N T S.................................................
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!