Menu
Question Index
...

What will be the output of the following program?

public class DemoOnLong
{
    public static void main(String[] args)
    {
        long[][] input = new long[3][];
        input[0] = new long[2];
        input[1] = new long[3];
        input[2] = new long[5];
        input[0][1] = 12L;
        System.out.println(input[0][1]);
    }
}


12
12L
-12
-12L
Compilation Error or 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