title: How to print out a hashset
body: <p>I just now started working with hashsets and I am trying to print it out but all it prints out is its location i tried Iterator and .toString() here is my code :</p>
  
  <pre><code>char [] a = RandomWord.toCharArray();
          HashSet&lt;char[]&gt;  set = new HashSet&lt;char[]&gt;();
          set.add(a);
            Iterator&lt;char[]&gt; itr = set.iterator();
              while(itr.hasNext()){
                  System.out.println(" Iterating over HashSet in Java current object: " + itr.next().toString());
              }
      }
  </code></pre>