title: How to convert a two dimensional int array to a single string using streams?
body: <p>I'm trying to convert a two dimensional int array to a single int where there is a space in between each number and a line break after each single array using streams.</p>
  
  <p>I've done this easily for single dimensional arrays with mapToObj, but this does not when the stream consists of arrays instead of ints.</p>
  
  <pre class="lang-java prettyprint-override"><code>int[] a = {1, 2, 3, 4};
  
  String[] strArray = Arrays.stream(a).mapToObj(String::valueOf).toArray(String[]::new);
  
  String joined = String.join(" ", strArray);
  </code></pre>
  
  <p><code>a</code> would map to <code>1 2 3 4</code> here. What I want would be to have something like </p>
  
  <p><code>int[][] a = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};</code></p>
  
  <p>map to </p>
  
  <pre><code>1 2 3
  4 5 6 
  7 8 9
  </code></pre>
  
  <p>How can I get something similar to <code>joined</code>, but with two dimensional arrays and still using streams?</p>