Why does printing a char[] in the following program not print any output, whereas the same program prints output for when the char[] is replaced with other array types int[] or float[] or String[] etc
public class Test5 {
public static void main(String[] args) {
char arr[] = new char[5];
System.out.println(arr);
System.out.println(arr[0]);
}
}
whereas the following prints output with int[]
public class Test5 {
public static void main(String[] args) {
int arr[] = new int[5];
System.out.println(arr);
System.out.println(arr[0]);
}
}
OutPut : [I@4cc77c2e
0