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
Which three staements about gravity and the formation of the solar system are true?
Yuliya22 [10]

Answer:Gravity held the pieces of forming planets together. Gravity pulled most of the matter into the center of the solar system Gravity caused the planets and Sun to have spherical shapes.​

Explanation:

7 0
3 years ago
A third-grade teacher at Potter Elementary School wants a program that allows a student to enter the amount of money a customer
mina [271]

Answer: IDK

Explanation: ummm I have no idea wut ur asking meh

6 0
3 years ago
The term packet is used fairly generically to refer to protocol data unit (PDU). There are PDU equivalent names in the different
Westkost [7]

Answer:

Bits

Explanation:

The protocol data unit is the representative unit of data in the OSI layer of a network. The OSI system has seven layers.

The physical layer is the first layer of the system and the protocol data unit is represented as bits of data.

Note that the term packet is the PDU for data in the network layer of the OSI network system.

4 0
3 years ago
This provides an easy method for workers to use their computers.
Keith_Richards [23]

GUI is your the method.Hope that helps.

3 0
4 years ago
Read 2 more answers
A company has three different PLANs for Sales, service, and accounting departments. Most network traffic is localized within the
klemol [59]

Answer:

The best choice in this situation is the Router.

Explanation:

A router is hardware networking device that receive, analyze and forwards data packets to another network or between computer networks. It assists to direct data on the internet and its connected to at least two networks. Router can also be a gate way that is an interface or connection between two or more networks.

4 0
4 years ago
Other questions:
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    11·2 answers
  • When you open a program, the hard drive
    7·2 answers
  • Students who interact online with others from different cultures should remember that
    5·2 answers
  • Oracion con punto focal​
    6·1 answer
  • Raul converts numbers in base 10 to base 2. Which answer best defends why Raul would need to do this?
    12·1 answer
  • Which of the following is a set of short-range wireless technologies used to share information among devices within about two in
    8·1 answer
  • Which two statements are true about the Data Sync functionality? (Choose two.)
    15·1 answer
  • The engine flywheel bolts to the Rotor Pistons Front axle Crankshaft
    13·1 answer
  • NEED HELP IMMEDIATELY!!
    15·1 answer
  • By what other name can the folders in Windows 7 be called?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!