title: We know that HashSet internally work as HashMap so while printing Hashset Object why element comes in array?
body: <pre><code>HashSet prime=new HashSet();    // I have created HashSet Object in eclipse IDE
  System.out.println(prime);           //As I am getting [] though HashSet internally work as HashMap data structure;
  </code></pre>
  
  <p>Why does it not comes in curly braces <code>{}</code></p>