title: Java: Converting a set to an array for String representation
body: <p>From Sun's <a href="http://java.sun.com/docs/books/tutorial/collections/interfaces/collection.html" rel="noreferrer">Java Tutorial</a>, I would have thought this code would convert a set into an array.</p>
  
  <pre><code>import java.util.*;
  
  public class Blagh {
      public static void main(String[] args) {
          Set&lt;String&gt; set = new HashSet&lt;String&gt;();
          set.add("a");
          set.add("b");
          set.add("c");
          String[] array = set.toArray(new String[0]);
          System.out.println(set);
          System.out.println(array);
      }
  }
  </code></pre>
  
  <p>However, this gives</p>
  
  <pre><code>[a, c, b]
  [Ljava.lang.String;@9b49e6
  </code></pre>
  
  <p>What have I misunderstood?</p>