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]
4 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]4 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
A security system uses sensors at every door and window which will set off an alarm if any one of them is opened. There is also
AnnyKZ [126]
You have a raspberry pi connected to all the sensors and a code running to  trigger if the sensors are triggered. Each sensor and keypad would run to a different input on the pi. They should al be able to be powered with a single cell lipo. Is that what you are asking?
5 0
3 years ago
After clicking the Start button on your computer screen desktop, what option would you then select to examine system components
Sveta_85 [38]
You can find the components that you wanted to modify in : C. control panel

You can adjust your computer's setting through control panel, whether it's your system and security, hardware, net work setting, etc

hope this helps
4 0
4 years ago
Read 2 more answers
__________ is the backbone of a computer, connecting all of its components including the central processing unit (CPU) and prima
Tems11 [23]
It’s D. The microprocessor
5 0
3 years ago
What are some ways to access the Excel Help window? Check all that apply. clicking and dragging the zoom slider on the status ba
Fudgin [204]

double-clicking the title bar

clicking the question mark in the upper-right corner of the interface

8 0
4 years ago
Read 2 more answers
BI U
elena-s [515]

Answer:

This should be done in a PowerPoint presentation and word processor like MS PowerPoint and MS Word (if I understood your question correctly)

6 0
3 years ago
Other questions:
  • ________ feature full-time monitoring tools placed at the most vulnerable points, or "hot spots", of corporate networks to prote
    10·1 answer
  • What does the cpu do (in terms of register contents and stack) when it executes a jsr instruction?
    12·1 answer
  • Which key is used in word processors to create indentations?
    13·2 answers
  • It is vital to the organization and the success of the disaster recovery plan that the plan be thoroughly tested on a(n) _______
    5·1 answer
  • How do you do these two questions? The first might have multiple answers and the second will have only one answer.
    14·1 answer
  • Given that n refers to a positive integer, use a while loop to compute the sum of the cubes of the first n counting numbers, and
    12·1 answer
  • Two ways in which the media does not reflect the society you live in.
    9·1 answer
  • Storage that is wiped clean when power is cut off from a device is known as _____.
    13·1 answer
  • Artificial intelligence (ai) in perspective is a complex and interdisciplinary field that involves several specialties, includin
    9·1 answer
  • you're troubleshooting an ip addressing issue, and you issue a command to view the system's tcp/ip configuration. the command yo
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!