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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:30, Cassandoo
The total revenues for a company are $150,223 and the total expenses were 125,766. if you are calculating the net income, which of these spreadsheets would you use? insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2-b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2+b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2/b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2*b3. the formula should be showing in the formula bar.
Answers: 3
image
Computers and Technology, 23.06.2019 02:00, rah45
Which of the following is not a source of sustainable raw materials? a) coal mine b) flick of sheep c) cotton plantation d) line forest.
Answers: 2
image
Computers and Technology, 23.06.2019 07:30, jackie0833
Which option allows you to view slides on the full computer screen?
Answers: 1
image
Computers and Technology, 23.06.2019 15:30, taapeters
Brian wants to conduct an online search with a certain phrase. he intends to use the words books that belong to the 1800s in his search. how should he use the word that in his search?
Answers: 1
You know the right answer?
Assume the method dosomething has been defined as follows: public static void dosomething (int[] va...

Questions in other subjects:

Konu
Mathematics, 13.06.2021 05:20
Konu
Mathematics, 13.06.2021 05:20
Konu
Social Studies, 13.06.2021 05:20
Konu
Mathematics, 13.06.2021 05:20
Konu
English, 13.06.2021 05:20