title: Initialize character array
body: <p>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:</p>
  
  <pre><code>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 " 
  </code></pre>
  
  <p><strong>Edit:</strong> I have also tried to use <code>char[] expArray = new char[expEv.length] {'\0'};</code> but this doesn't work as </p>
  
  <p>Please help me with this and explain the array initialization for the context.</p>