Menu
Question Index
...

What will be the output of the following program?

public class DemoOnArray {
    public static void main(String args[]) {
        int[][] firstArray, secondArray;
        firstArray = new int[1][1];
        secondArray = new int[2][2];
        firstArray[0][0] = '\n';
        secondArray[0][1] = 'a';
        System.out.print("Mod = " + secondArray[0][1] % firstArray[0][0]);
    }
}


Mod = 65
Mod = 10
Mod = 7
Compilation Error
Runtime Error

Doubts

Problems

Topic: Java Multidimensional Array

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App