Question: In a 2d array in java, how do I loop through a specific column, say i have a 3 by 3 matrix 1 3 4

In a 2d array in java, how do I loop through a specific column, say i have a 3 by 3 matrix

1 3 4

1 2 4

4 6 6

and I want to loop through the 2nd column (3,2,6) and print it. How would I do this?

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!