I am just new to Java and I am struck in my program with Array initialization because it's not working and contains some garbage. This is what I am doing:
char[] expArray = new char[expEv.length]; //expEv.length is int - expEv is another array
//I have tried all following but not working
expArray = {'\0'}; // error i get: Array constants can only be used in initializers
expArray = {'',};
expArray = {'\0'};
System.out.println("array value: " + expArray); // prints " array value: [C@1cd761a "
Edit: I have also tried to use char[] expArray = new char[expEv.length] {'\0'}; but this doesn't work as
Please help me with this and explain the array initialization for the context.