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
Paul [167]
3 years ago
6

Assume the method doSomething has been defined as follows: public static void doSomething (int[] values, int p1, int p2) { int t

emp = values[p1]; values[p1] = values[p2]; values[p2] = temp; } What does the method do? Group of answer choices
a.It inserts a new value into the array values.
b.It swaps the integer values stored in positions p1 and p2 of the array values.
c.It copies the integer array values to a new array.
d.It moves each element of the array values to a higher index position.
Computers and Technology
1 answer:
Dmitriy789 [7]3 years ago
8 0

Answer:

The answer to this question is option "b".

Explanation:

In the method definition, we perform swapping. To perform swapping we define a variable "temp" that swap values of variable p1 and p2 and store in array that is "values". and other options are not correct that can be defined as:

  • In option a, It does not insert any new value in array because we do not pass any value in function.
  • In option c, The function does not copy and assign a value in a new array because in this function we not assign any new array.  
  • In option d, It is incorrect because it can not move an element into high index position.
You might be interested in
Enter the database function in cell i6 that determines the average salary of all full-time employees with at least one dependant
love history [14]

Based on the given spreadsheet, the database function that needs to be entered into cell I6 to find the average salary of all full-time employees is =AVERAGEIFS(D5:D34,B5:B34,"FT",C5:C34,">=1")

<h3>What does the AverageIfs formula find?</h3>

You can use the AverageIfs formula to find the average of a specific group of numbers from a spreadsheet based on the shared categories that these numbers fall under.

After typing in the =AverageIfs function, you then input the range from which the category will be specified. In this case that is D5:D34. The next entry would be the range the category is picked from which is  B5:B34. The function will be FT for Full time workers.

Then use C5:C34 to find out the number of dependents that are equal to or greater than 1.

The digit returned is the average salary of all full-time employees.

Find out more on the AverageIf function at brainly.com/question/13661607

#SPJ1

4 0
2 years ago
What is the correct order of precedence of the mathematical operators?
LenaWriter [7]
A common technique for remembering the order<span> of </span>operations<span> is the abbreviation "PEMDAS", which is turned into the phrase "Please Excuse My Dear Aunt Sally". It stands for "Parentheses, Exponents, Multiplication and Division, and Addition and Subtraction".</span>
7 0
3 years ago
What shortcut bring up the print page
Kobotan [32]
The keyboard shortcut to bring up print on windows is ctrl+P, for Mac it's cmd+P.

Unless, you mean print screen - for that, there is a button that should say prt sc on your keyboard for windows, and for Mac, it's cmd <span>+ ctrl + shift + 3 to save to clipboard (or don't hold down the ctrl to save to your desktop).</span>
7 0
3 years ago
Read 2 more answers
Write a program that asks the user to enter a number of seconds and then printsthe same amount of time in days, hours, minutes,
MariettaO [177]

Answer:3363 seconds

Explanation:3363 is equivalent to 0days 1 hour, 1 min, and 7 sec

8 0
3 years ago
The mode is least appropriate for:___________
bazaltina [42]

Answer:

Your question seems incomplete

Explanation:

7 0
2 years ago
Other questions:
  • Susan bought a new sweater on sale for $28.93.she was charged HST of 13%.find the total amount of her bill including taxes.​
    9·1 answer
  • Consider the class Money declared below. Write the member functions declared below and the definition of the overloaded +. Modif
    13·1 answer
  • Assume that the following method header is for a method in class A.
    15·1 answer
  • JAVA QUESTION::
    10·1 answer
  • How do you think computers have helped to improve documentation, support and services within the healthcare industry.
    5·2 answers
  • 2.
    11·1 answer
  • What will be displayed in the console when this program runs?
    14·2 answers
  • What is the fullform of ETA in computer term​
    15·1 answer
  • Miley met up with a bunch of her college friends after several years. She told them that she works for the sound department of a
    5·1 answer
  • The most important part of a computer​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!