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
Ivenika [448]
3 years ago
9

Create a method called fixArray(int[][] array, int row, int col, int value) that sets the [row][column] to the correct value. Th

en, call the fixArray method three times - once for each value change that you are supposed to make.
Computers and Technology
1 answer:
PolarNik [594]3 years ago
7 0

Answer:

  1. public class Main {
  2.    public static void main (String [] args) {
  3.        int[][] myArray = {{1,5,6}, {7, 9, 2}};
  4.        fixArray(myArray, 1, 2, 12);
  5.        System.out.println(myArray[1][2]);
  6.    }
  7.    private static void fixArray(int[][] array, int row, int col, int value){
  8.        array[row][col] = value;
  9.    }
  10. }

Explanation:

The solution code is written in Java.

Firstly, create the method fixArray with that takes four inputs, array, row, col and value (Line 11). Within the method body, use row and col as index to address a particular element from array and set the input value to it (Line 12).

Next, we test the method in the main program using a sample array (Line 4) and we try to change the row-1 and col-2 element from 2 to 12 (Line 5).

The print statement in Line 7 will display 12 in console.

You might be interested in
If you’d like to have multiple italicized words in your document, how would you change the font of each of these words
Alex787 [66]

Answer:

Use styles and modify the font of the default style

Explanation:

4 0
2 years ago
What can you search on Microsoft Word or Powerpoint Clipart or Google (Clip art) to find more pictures like the ones below but w
elena-14-01-66 [18.8K]
Well if you put sad/mad/scared/tired/ect it should pop up with the same person.
3 0
3 years ago
What two items must be given to the socket function in order to create a socket object? A) The socket type that will be used. B)
Yuki888 [10]

Answer:

The correct option are:-

a) The socket type that will be used

d) The socket family that will be used  

Explanation:

The socket() method generates the unbound socket in a networking domain and returns a descriptor of the register, which can be used in subsequent socket function calls.

The socket() method takes three arguments:  

Domain:- The domain for which a socket is to be built is defined.

Type:- The socket type to be generated is defined.

Protocol:- It specifies a common socket protocol to use. The protocol setting of 0 causes socket() to use a default uninstalled protocol that is suitable for the socket type requested.

5 0
3 years ago
What is the definition of hardware
wel
<span>the machines, wiring, and other physical components of a computer or other electronic system.</span>
3 0
3 years ago
Read 2 more answers
Answer in python code:
katovenus [111]

Answer:

a

Explanation:

sxcvbnm,mnbvcxzzdfghjkjhgfdssd54567uhgft

7 0
2 years ago
Other questions:
  • 1. Grouping Data in a Pivot Table can help you do what?
    5·1 answer
  • What are the most popular/up-and-coming social media applications?
    10·2 answers
  • A department store plans to upgrade its IT infrastructure to support a new order-processing application with rich features. The
    13·1 answer
  • What is meant by polling mode in communication between software andUART and what is its disadvantage as compared to interrupt mo
    14·1 answer
  • Matt goes to an Internet café and tries to access his emails. The email client asks Matt to enter his email address along with t
    15·1 answer
  • A combination lock has the following basic properties:
    10·1 answer
  • Yo who do u add a pic on here
    13·1 answer
  • A testing lab wishes to test two experimental brans of outdoor pain long each wiil last befor fading . The testing lab makes six
    11·1 answer
  • Sergio knows that to meet the project requirements, it is essential to have
    9·1 answer
  • Why does it say error on that last line of code
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!