title: Java Array Char And String Difference In Array
body: <p>While making up some arrays I noticed that </p>
  
  <pre><code>char[] javaArray = {'j','a','v','a'};
  </code></pre>
  
  <p>prints out </p>
  
  <pre><code>java
  </code></pre>
  
  <p>but </p>
  
  <pre><code>String[] javaStringArray = {"j","a","v","a"};
  </code></pre>
  
  <p>only prints the stack location. I know char and String are both very different, but how come the JVM knows to output chars for the first and only a stack location for the second?</p>
  
  <p>I am using IntelliJ and the command <code>System.out.println(javaArray);</code></p>