-
What will this code print?
public class array
{
public static void main(String args[])
{
int arr[] = new int [7];
System.out.print(arr);
}
}
-
- [I@2a139a55
- Runtime Error
- 0 0 0 0 0 0 0
- Compilation error
- None of these
Correct Option: A
If we trying to print any reference variable internally, toString() will be called which is implemented to return the String in following form:
[I@2a139a55