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
Wyjaśnij w jaki sposób wykonuje się nitowanie zakładkowe i nakładkowe, oraz wyjaśnij na czym polega pasowanie mieszane.
Ksenya-84 [330]

Answer:

????

Explanation:

i dont speak this language

7 0
3 years ago
In 1–2 sentences describe the purpose of comparison operators and give an example.
love history [14]
Comparison operators are used to compare between objects!
are they equal?  is one greater than the other?

if (a == b) ++a;
if (a > b) a = b;

for example when we use a sort function, comparison operators are used inside the function.

7 0
3 years ago
Create java program for these 2 question
morpeh [17]

1 see what you can do and go from their

7 0
3 years ago
Alice just wrote a new app using Python. She tested her code and noticed some of her lines of code are out of order. Which princ
kaheart [24]

Answer:

Sequencing

Explanation:

I have taken the test

5 0
3 years ago
Given four inputs: a, b, c & d, where (a, b) represents a 2-bit unsigned binary number X; and (c, d) represents a 2-bit unsi
Amiraneli [1.4K]

Answer:

z = a.c' + a.b.d' + b.c'.d'

Explanation:

The truth table for this question is provided in the attachment to this question.

N.B - a' = not a!

The rows with output of 1 come from the following relations: 01 > 00, 10 > 00, 10 > 01, 11 > 00, 11 > 01, 11 > 10

This means that the Boolean expression is a sum of all the rows with output of 1.

z = a'bc'd' + ab'c'd' + ab'c'd + abc'd' + abc'd + abcd'

On simplification,

z = bc'd' + ab'c' + ac'd' + ac'd + abc' + abd'

z = ac' + abd' + bc'd'

Hope this helps!

6 0
4 years ago
Other questions:
  • 1. Which of the following are considered CAD powerhouses?
    6·1 answer
  • Which sector provides scope for multimedia designers?
    10·1 answer
  • By generating and delivering timely and relevant information supported by networks, _____ creates new opportunities for conducti
    15·1 answer
  • True or false a computer network requires both hardware and software
    9·2 answers
  • The best way to insert an existing Excel chart into a document is to
    12·2 answers
  • You have created a new DHCP scope with address range 192.168.1.1 to 192.168.1.254. You have five servers configured with static
    8·1 answer
  • Access-lists pose a logical problem which often has more than one solution. Can you think of a different set of rules or placeme
    8·1 answer
  • a machine needs a minimum of 100 sec to sort 1000 names by quicksort what is the approximate worst case time needed to sort 100
    13·1 answer
  • 5) The City Jail Technologies Department is constructing an application to allow users in the Crime Analysis Unit to query data
    11·1 answer
  • Which type of protocol provides a way to transfer files from one computer to another over any tcp/ip network, such as a lan or t
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!