title: Why toString() method works differently between Array and ArrayList object in Java
body: <pre><code>    String[] array = {"a","c","b"};
      ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
      list.add("a");
      list.add("b");
      list.add("c");
      System.out.println(array);
      System.out.println(list);
  </code></pre>
  
  <p>For <code>list</code> <code>[a, b, c]</code> is output while for <code>array</code> some address is output. When we want to output the <code>array</code> values, we can use <code>Arrays.toString(array);</code> which works just like <code>list</code>.</p>
  
  <p>I just wonder why we can't call <code>toString()</code> directly on <code>array</code> to get the values. Isn't it more intuitive and convenient to do so? What results in the different treatments on <code>Array</code> and <code>ArrayList</code>?</p>