Question: public class ArrayLab { public static void main(String[] args) { int[][] stuff = { {33, 92, 54}, {22, 43, 90}, {26, 85, 21}, {75, 14,
public class ArrayLab { public static void main(String[] args) { int[][] stuff = { {33, 92, 54}, {22, 43, 90}, {26, 85, 21}, {75, 14, 66}, { 8, 49, 89} }; // 1. print out the array contents going across the rows // but from the last row to the first: // 8, 49, 89 // 75, 14, 66 // etc..... System.out.println("part 1"); //outer loop row wise in reverse for(int i=(stuff.length)-1;i>0;i--) { //inner loop for printing the elements for(int j=0;j=0;i--) { //inner loop to print elements for(int j = stuff.length-1; j >=0; j--) { if(j==0) System.out.print(stuff[j][i]+""); else System.out.print(stuff[j][i]+", "); } System.out.print(" "); } // 4. print out the array contents in "normal" order, // in other words: // 33, 92, 54, // 22, 43, 90 // etc.... System.out.println(" part 4"); //outer loop to scroll through the rows for(int i=0;i Read each statement and fix program to work adding comments
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
