adplus-dvertising
frame-decoration

Question

What is the output of this program?
    class Output 
    {
        public static void main(String args[])
        {
            int a1[] = new int[10];
            int a2[] = {1, 2, 3, 4, 5};
            System.out.println(a1.length + " " + a2.length);
        } 
    }

a.

10 5

b.

5 10

c.

0 10

d.

0 5

Posted under Java Programming

Answer: (a).10 5

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?