title: java - print() does not output char array if the array has int value?
body: <p>I am bit confused about how Java handle conversion.</p>
  
  <p>I have char array consist of 0 (not '0')</p>
  
  <pre><code>char[] bar = {0, 'a', 'b'};
  System.out.println(String.valueOf(bar));
  </code></pre>
  
  <p>When this happens println method does not output anything. But when I treat zero as character:</p>
  
  <pre><code>char[] bar = {'0', 'a', 'b'};
  System.out.println(String.valueOf(bar));
  </code></pre>
  
  <p>Then it output "0ab" as expected.</p>
  
  <p>My understanding was if you declare array of primitive type with empty value like:</p>
  
  <p>char[] foo = new char[10];</p>
  
  <p>those empty cells have default value of 0 in Java, so I thought it was ok to have 0 in the char array but seems like not. Could anyone explain why print method is not even outputting 'a' and 'b' ?</p>