Question

What is the output of the following code?     public class Test {         public static void main(String[] args) {             int[] arr = new int[5];             System.out.println(arr[2]);         }     }

A Garbage value
C null
D Compilation error
E ArrayIndexOutOfBoundsException
Practice Next

Hey! Ask a query