title: Convert set of integers to string in java
body: <p>I am trying to convert a set of integers to a single string in Java. How can I do that?</p>
  
  <pre><code> Set&lt;Integer&gt; s = new HashSet&lt;&gt;();
          s.add(1);
          s.add(3);
  
          int n = s.size();
          String arr[] = new String[n];
  
          arr = s.toArray(arr);
  
          for (String x : arr )
              System.out.println(x);
  </code></pre>