Home » JAVA Programming » Arrays » Question
  1. What will this code print?

    int a[] = new int [10];
    System.out.print(a);
    1. Garbage value
    2. 00000
    3. value stored in arr[0].
    4. 0
    5. None of these
Correct Option: A

arr is an array variable, it is pointing to array of integers. Printing arr will print garbage value. It is not same as printing arr[0].



Your comments will be displayed only after manual approval.