Question:What is the output of the given console application?
public class Test19 {
        public static void main(String[] args) {
                final int X = 9;
                int[][] a = {{5, 4, 3}, {9, 7, 2}, {1, 6, 8}};
                for (int i=0; i<3; i++) {
                        for (int j=0; j<3; j++) {
                                if (a[i][j] == X) break;
                                System.out.print(a[i][j] + "" "");
                        }
                }
        }
}
 

A 5 

B 5 4 3 

C 5 4 3 1 6 8 

D 5 4 3 7 2 1 6 8 

+ Answer
+ Report
Total Preview: 925

Copyright © 2024. Powered by Intellect Software Ltd