subject

Assume the method dosomething has been defined as follows: public static void dosomething (int[] values, int p1, int p2) { int temp = 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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
in 2007, floridians died in alcohol-related collisions.a.  501b.  1,051c.  5,015d.  10,839
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
What is the first view you place in your drawing?
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Which cultural aspect does this type of song best portray? a german polka dance
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
You know the right answer?
Assume the method dosomething has been defined as follows: public static void dosomething (int[] va...
Questions
question
Biology, 21.05.2020 09:58
question
Mathematics, 21.05.2020 09:58
question
Social Studies, 21.05.2020 09:58
question
Physics, 21.05.2020 09:58
question
Health, 21.05.2020 09:58
Questions on the website: 13722363