Question: Consider the following data field and method. private int [ ] [ ] mat; public void mystery ( ) { for ( int row =

Consider the following data field and method.
private int[][] mat;
public void mystery ()
{
for (int row =1; row < mat.length; row++)
{
for (int col =0; col < mat[0].length; col++)
{
if (row != col)
mat[row][col]= mat[row -1][col];
}
}
}
Assume that mat contains the following values. Note that mat[0][4] is 2.
41342
18753
74692
38124
56703
What values does mat contain after a call to mystery?
Responses
41342
48342
48642
48622
48623
4134248342486424862248623
41342
41342
41342
41342
41342
4134241342413424134241342
41342
41342
18753
74692
38124
4134241342187537469238124
44444
11111
77777
33333
55555
4444411111777773333355555
48623
48623
48623
48623
48623

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!