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
F he continues to make monthly payments of $100, and makes no new purchases, how many more payments will he have to make before
castortr0y [4]

What is the interest rate?

Divide the total amount due by 100.

8 0
3 years ago
What is an example of technology that helps support the idea of continental drift.
docker41 [41]

I don't know technology, but using Satellite images, we are able to see that the continents once fitted into one 'jigsaw'. This shows that the continents must have drifted to its original place. Furthermore, Geothermal stations have pointed out convection currents in the Earth's mantle has caused the movement of crusts.
8 0
2 years ago
When resizing images or objects in a presentation, why should a user not utilize the sizing handles in the middle of the sides
Shalnov [3]

When resizing an image or an object in a presentation, a user should not utilize the sizing handles in the middle of the sides or the bottom of the image. There's nothing wrong with resizing this way.

There's nothing wrong with resizing this way

<u>Explanation:</u>

When the sizing handles in the middle of the sides are used, the image stretches out reflecting an increase in the width maintaining There's nothing wrong with resizing this way.

On the other hand, while using the sizing handles at the bottom, the image increases in height whilst maintaining the same width again disturbing the aspect ratio.

5 0
3 years ago
Read 2 more answers
Which of the following is NOT an example of editing?
Genrish500 [490]

Answer:

ang answer po at proofreading written

content

Explanation:

if I wrong please correction me!

8 0
2 years ago
Direction. List down 5 preventive maintenance tips in using tools and equipment.<br>1.​
PSYCHO15rus [73]

Answer:

Explanation:

preventive maintenance tips in using tools and equipment.

1. Inspect tools and equipment on a regular basis so as to avoid unexpected breakdown.

2. Clean tools and equipment immediately after use. It is important to wash or clean tools after using them in order to avoid clogging of dirts on them

3. Replace tools and equipment back to their respective storage place immediately after using them

4. Lubricate your tools and equipment to avoid rusting. Lubrication means to oil especially metal tools and equipments.

5. Always follow the instructions of use and maintenance of tools and equipments as stated by the manufacturer.

3 0
3 years ago
Other questions:
  • The checksum doesn't compute for a packet sent at the Internet Protocol (IP) level. What will happen to the data?
    14·1 answer
  • Mr. Yang is a doctor who regards video games as an effective means of staying fit. What type of game would he recommend to his p
    11·2 answers
  • Objects of the calculator class require no additional information when created. define an object named calc, of type calculator.
    14·2 answers
  • ____ is the code of acceptable behaviors users should follow while on the internet; that is, it is the conduct expected of indiv
    10·1 answer
  • The greatest common divisor of integers x and y is the largest integer that evenly divides into both x and y. Write a recursive
    7·1 answer
  • Given an array arr, of type int, along with two int variables i and j, write some code that swaps the values of arr[i] and arr[j
    11·1 answer
  • Why the internet is not considered a mass medium in Africa​
    13·2 answers
  • In addition to assuming that n is a power of 2, we made, for the sake of simplicity, another, more subtle, assumption in setting
    5·1 answer
  • When you add encryption to a powerpoint presentation what does it do
    14·1 answer
  • A time stamp indicates the date and time that a measurement was taken. A data scientist has a list containing 10,000 time stamps
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!