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
Determine which Software Type on the right best corresponds to each Definition on the left. Then, click the Definition, and then
Lostsunrise [7]

Answer:

Programs and applications.

Explanation:

3 0
3 years ago
The incompatibilities in speed between the various devices and the CPU make I/O synchronization difficult, especially if there a
Iteru [2.4K]

Answer:

In a buffer

Explanation:

We can define a buffer as a temporary holding area for data between the various devices and the CPU make I/O synchronization especially if there are multiple devices attempting to do I/O at the same time.

Items stored at the buffer helps to reduce the The incompatibilities in speed between the various devices and the CPU.

3 0
3 years ago
According to the Bureau of Labor Statistics, how
Vladimir79 [104]

Answer:

one million

Explanation:

took test

7 0
3 years ago
Need help !!!!!!!!!!!!!!!
Paladinen [302]

# 2 on the right goes to zipties

3 0
3 years ago
Do all light bulbs server a practical purpose?
Greeley [361]

Answer:

A light bulb produces light from electricity

6 0
3 years ago
Other questions:
  • If an occupation is projected to grow by 13% over the next 10 years, how would you rate the job outlook?
    7·2 answers
  • In a five-choice multiple-choice test, which letter is most often the correct answer?
    7·2 answers
  • Variable names may contain spaces and punctuation symbols. True False
    15·1 answer
  • The ability to memorize well is an example of
    6·2 answers
  • Summary In this lab, you declare and initialize variables in a C++ program. The program, which is saved in a file named NewAge.c
    5·1 answer
  • For connection to place on any network you must have a set of standards?<br> O True<br> O False
    8·1 answer
  • Can you awnser this question
    15·1 answer
  • Overview
    7·1 answer
  • Define the term algorithm and describe how programmers use algorithms when designing a program.
    13·1 answer
  • In computer science, what is the name for a series of steps used to solve a problem?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!