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
Rashid [163]
4 years ago
5

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:
Kobotan [32]4 years ago
8 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
Why did artists use pinhole cameras during the renaissance?
Dima020 [189]
Pinhole cameras were one of the most sophisticated devices of the period, it made tasks much easier it basically worked exactly like the human eye and is something just like tracing.
8 0
3 years ago
You bought a monochrome laser printer two years ago. The printer has gradually stopped feeding paper. Which printer component sh
lilavasa [31]

Answer:

Pick up roller

Explanation:

you should first check the pickup roller component. This component is the part of the printer that picks paper up from the paper tray. The pickup roller links the printer and the paper. When the printer printer is running, the roller would take paper from the paper tray for the printer to print on. One of the issues it can have is Paper jam where the roller would stop turning so that it will no longer be picking papers up from the tray.

3 0
3 years ago
When an EC2 instance is being modified to have more RAM, is this considered Scaling Up or Scaling Out?
Nastasia [14]

If an EC2 instance is being modified to have more RAM, this is known as Scaling Up.

<h3> What is EC2 Auto Scaling?</h3>

The Amazon EC2 Auto Scaling is known to be a type of fully well handled service that has been set up to launch or hinder Amazon EC2 instances automatically.

It is often made so as to help make sure that people have the correct number of Amazon EC2 instances that is available to manage the load for their  application. To scaleup is to bring up.

Learn more about RAM from

brainly.com/question/13196228

7 0
3 years ago
The study and practice of information storage and retrieval is called
puteri [66]
Information Science
4 0
3 years ago
And there you go <br> sorry its saying my thing is tooo small
zaharov [31]

Answer:

Global knowledge is the answer

6 0
4 years ago
Read 2 more answers
Other questions:
  • How many megabytes of data can a factory made audio cd hold?
    13·1 answer
  • A user is claiming a host can be reached via the IP address but not through the name. What should a technician do first to resol
    13·1 answer
  • What is an optical storage device?
    7·2 answers
  • "You are setting up a new subnetwork on an existing network. Management has asked that you use existing cabling that the company
    14·1 answer
  • You might have trouble interpreting a message if:
    15·1 answer
  • Which of the following best describes when a packet is addressed so that more than one destination can receive it and the first
    11·1 answer
  • 1) List two hardware methods that can be used to secure data
    11·1 answer
  • Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolut
    12·1 answer
  • Choose the statement that is true please help me fast like right now
    12·1 answer
  • Write a function named parts that will take in as parameters the dimensions of the box (length, width, and height) and the radiu
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!