title: How to get the difference between 2d arrays in java 8
body: <p>Could someone please help here.</p>
  <p>I have two 2d arrays in java. As shown below</p>
  <pre><code>char[][] array1 = {{'a','b'},
                    {'c','d'}};
  
  char[][] array2 = {{'-','b'},
                  {'c','-'}};
  </code></pre>
  <p>Now I need to compare array1 and array2. I need to get array2 values of '-' from array1.</p>
  <p>In the above case - I should get 'a' and 'd'. Since 'b' and 'c' remains common in above arrays.</p>
  <pre><code> StringBuilder sb = new StringBuilder();
  
          for (int i = 0; i &lt; arr1.length; i++) {
              for (int j = 0; j &lt; arr1[0].length; j++) {
                  if (arr1[i][j]!=arr2[i][j]){
                      sb.append(arr1[i][j]).append(&quot;,&quot;);
                  }
              }
          }
  </code></pre>
  <p>I want a better or effective way using Java 8</p>