title: Convert a list of integers into a comma-separated string
body: <p>I was trying to convert a list of Integers into a string of comma-separated integers.</p>
  <p><strong>Collectors.joining(CharSequence delimiter)  - Returns a Collector that concatenates the input elements, separated by the specified delimiter, in encounter order.</strong></p>
  <pre><code>List&lt;Integer&gt; i = new ArrayList&lt;&gt;();    //  i.add(null);
  for (int j = 1; j &lt; 6; j++) {
      i.add(j);
  }
  System.out.println(i.stream().collect(Collectors.joining(&quot;,&quot;))); // Line 8
  </code></pre>
  <p>I am getting an error in line number 8.</p>
  <p>Is there a way to do this by streams in Java 8?</p>
  <p>If I create a list of strings with <code>&quot;1&quot;, &quot;2&quot;, &quot;3&quot;,&quot;4&quot;,&quot;5&quot;</code>. it works.</p>