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
Consider the following instructions for a game element: Move Forward If not at end, move forward Else stop This is an example of
xz_007 [3.2K]

Answer:

C.

Explanation:

8 0
3 years ago
Plato :
ddd [48]

Answer:

filler content

Explanation:

Isabel must use some sort of filler content while creating a wireframe that she is up with. For the banner, she can make use of the placeholder, and for the text, she can make use of the lorem ipsum. Also, if the wireframe is low fidelity then only she can use above. And if the wireframe is high fidelity then she should use the original banner and text.

3 0
3 years ago
Read 2 more answers
Imagine that you are a professional white hat hacker, testing a company’s system to make sure they are ready for attacks. What m
liberstina [14]

Answer:

A white hat hacker, or ethical hacker, uses penetration testing techniques to test an organization's information technology

Explanation:

3 0
2 years ago
Uses of keyboard as a input device
KATRIN_1 [288]

helps us for typing letters, numbers and symbols etc.

3 0
3 years ago
Read 2 more answers
Membrane-bound organelles are not found in the cells of A) bacteria. B) fungi. C) plants. Eliminate D) protists.
77julia77 [94]
The answer is A. Bacteria leave a thanks if i am correct please.
7 0
3 years ago
Read 2 more answers
Other questions:
  • We can see spreadsheet results graphically by creating:
    15·1 answer
  • Where should you click to edit an existing formula?
    12·2 answers
  • The term “computer literacy” dates back to what decade? <br> 1960s<br> 1970s<br> 1980s<br> 1990s
    5·1 answer
  • write a program that asks the user to enter a positive integer, then prints a list of all positive integers that divide that num
    6·1 answer
  • When discussing the data-modeling building blocks, anything (a person, a place, a thing, or an event) about which data are to be
    15·1 answer
  • Which of the following are tasks you can
    12·2 answers
  • Design the logic for a program that allows a usher to continuously enter numbers until the usher enters 0. Display the sum of th
    9·1 answer
  • Refer to the image on the right. Then, using the drop-down menu, identify the correct printer type. A: inexpensive home printer
    10·1 answer
  • Which key combination should you use
    9·2 answers
  • NEED ANS ASAP THANK YOU
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!