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
MariettaO [177]
3 years ago
8

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?3
Mathematics
1 answer:
ValentinkaMS [17]3 years ago
4 0
First step is to analyze input and output variables:INPUT:list of integers with name "values"integer with name "p1"integer with name "p2"OUTPUT:there is no output variable as in declaration of a method there is void
ANALYSIS:"int temp = values[p1]"this line creates variable "temp" which is integer. then this line goes to the list "values" and takes value that is at position "p1" and stores it into variable "temp"
"values[p1] = values[p2]"this line goes to the list "values" and takes value that is at position "p2" and stores it into variable that is at position "p1"
"values[p2] = temp"this line takes value of the variable "temp" and stores it into list values at position "p2"
Short explanation:this code replaces values of the list at between positions p1 and p2
You might be interested in
Select the correct answer from each drop-down menu.
vova2212 [387]
As far as I can see, it should be 5/10 is parrots which is simplified into 1/2 .

Hope this helps!
6 0
4 years ago
Help help help help help help help help me plsss​
Nostrana [21]

Answer:

Nooooooooooooooooooo

3 0
3 years ago
Graph the inequality.<br> -9 less than or equal to y+ 5x less than or equal to 14
sukhopar [10]

Answer:rvfl

Step-by-step explanation:my computer is acting up sorry wrvob1

8 0
3 years ago
The population of a once very popular city of 250,000 people has been decreasing by 3.5% each year. Write an exponential decay f
vladimir2022 [97]
Y= 250000-8750t

3.5 percent of 250000 is 8750, if that’s the amount decreasing each (t) years, you multiply that number by number of years taken into account.
8 0
3 years ago
Vf²=vi²+ 2ad <br><br> A) solve for vi<br><br> B) solve for d <br><br> Using the same equation
diamong [38]
A)
               Vf² = vi² + 2ad   Subtract 2ad from both sides
     Vf² - 2ad = vi²              Find the square roots of both sides
√(Vf² - 2ad) = √(vi²)         Cancel out the squares with the square roots
  Vf - √(2ad) = vi               Switch the sides to make it easier to read
                 vi = Vf - √(2ad)

B)                 Vf² = vi² + 2ad   Subtract vi² from both sides
             Vf² - vi² = 2ad           Divide both sides by 2a
    (Vf² - vi²) / 2a = d               Switch the sdies to make it easier to read
                         d = (Vf² - vi²) / 2a
7 0
4 years ago
Other questions:
  • A room is 30 feet long, 25 feet wide, and 10 feet tall. If Mickey paints the walls and the ceiling, how much surface are will he
    9·1 answer
  • A cube with edges that are 1 unit long
    13·2 answers
  • 8 pencils cost 72p how much is the cost of 1.
    5·2 answers
  • What are the common factors of 60 36 48?
    11·2 answers
  • John and will ran for 6th grade class president.there were 36 students voting. John got two votes for every vote will got. How m
    5·1 answer
  • Solve the word problem.  The height of a triangle with base b and area A is given by the formula h = 2A/B .  What is the height
    12·1 answer
  • Grapes are sold by the pound. The table shows the total cost for different weights.
    5·2 answers
  • Find the geometric mean between 12 and 20 find the answer in radical form or round to the nearest tenth if necessary
    5·1 answer
  • Can anybody please help me​
    6·1 answer
  • Find the volume of a cone with a height of 6yd and a base radius of 4yd.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!