title: Joining stream of ints to a String, typecast problems
body: <p>I'm trying to join an array of ints in to a String using streams (e.g. <code>{1, 2, 3}</code> -> <code>"1, 2, 3"</code>), but I keep getting compile errors. There seems to be a problem with int/String type conversion.</p>
  
  <p>The array is <code>int[] IntArray = {1, 2, 3, 4}</code>.</p>
  
  <pre><code>    String s1 = Arrays.stream(IntArray)
                          .map(String::valueOf)
                          .collect(Collectors.joining(", "));
  </code></pre>
  
  <p>gives a compile error:</p>
  
  <pre><code>Error:(20, 68) java: incompatible types: bad return type in lambda expression
  java.lang.String cannot be converted to int
  </code></pre>
  
  <p>Replacing the map line with <code>.map(Object::toString)</code> or <code>.map(n -&gt; Integer.toString(n))</code> doesn't work either:</p>
  
  <pre><code>Error:(23, 49) java: incompatible types: invalid method reference
  method toString in class java.lang.Object cannot be applied to given types
  required: no arguments
  found: int
  reason: actual and formal argument lists differ in length
  </code></pre>
  
  <p>for <code>.map(Object::toString)</code>, and the first error for <code>.map(n -&gt; Integer.toString(n))</code>.</p>