What is the output of the Java code? int[] a = new int[3];
What is the output of the Java code?
int[] a = new int[3];
System.out.println(a[1]);
Show answerHide answer
Correct answer: (A) 0
Explanation
Java arrays of int are initialised to 0.
Correct answer: (A) 0
Explanation
Java arrays of int are initialised to 0.
This is question 141 of DSSSB TGT Computer Science Full Mock Test 4. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.