I am a beginner to Java. I read this recently
The elements in the array allocated by new will automatically be initialized to zero (for numeric types), false (for boolean), or null (for reference types) reference https://www.geeksforgeeks.org/arrays-in-java/
int n=scan.nextInt();
int a[]=new int[n];
int a1[]=new int[5];
System.out.println(a);
System.out.println(a1);
Both arrays are giving me a garbled value something like [I@4b67cf4d
Why is this happening?