Accenture Java Programming Practice 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); } }Answer options
A
10 5
B
0 5
C
5 10
D
0 10
Correct answer: 10 5
Explanation
Correct answer: 10 5.