title: (Java) Priority Queue Lambda Expression
body: <p>I am studying Java8 by myself. I don't understand a difference between</p>
  <pre class="lang-java prettyprint-override"><code>PriorityQueue&lt;Node&gt; heap = new PriorityQueue&lt;Node&gt;((n1, n2) -&gt; matrix[n2.row][n2.col] - matrix[n1.row][n1.col]);
  </code></pre>
  <p>and</p>
  <pre class="lang-java prettyprint-override"><code>PriorityQueue&lt;Node&gt; heap = new PriorityQueue&lt;Node&gt;((n1, n2) -&gt; matrix[n1.row][n1.col] - matrix[n2.row][n2.col]);
  </code></pre>
  <p>Let's suppose input and output are below:</p>
  <pre><code>matrix = [[1,5,9],[10,11,13],[12,13,15]];
  k = 8
  </code></pre>
  <p>I added a few matrix value using below code:</p>
  <pre class="lang-java prettyprint-override"><code>for(int i = 0; i &lt; matrix.length; i++) {
    if(i &lt; k){
      heap.add(new Node(i, 0));
    }
  }
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>class Node{
      int row;
      int col;
      
      public Node(int row, int col) {
          this.row = row;
          this.col = col;
      }
  }
  </code></pre>
  <p>In this case, 3 different matrix values are added in heap.</p>
  <ol>
  <li><code>PriorityQueue&lt;Node&gt; heap = new PriorityQueue&lt;Node&gt;((n1, n2) -&gt; matrix[n2.row][n2.col] - matrix[n1.row][n1.col])</code></li>
  </ol>
  <blockquote>
  <p>12, 1, 10</p>
  </blockquote>
  <ol start="2">
  <li><code>PriorityQueue&lt;Node&gt; heap = new PriorityQueue&lt;Node&gt;((n1, n2) -&gt; matrix[n1.row][n1.col] - matrix[n2.row][n2.col])</code></li>
  </ol>
  <blockquote>
  <p>1, 10, 12</p>
  </blockquote>
  <p>2nd code shows minimum Heap. Does anyone know the difference between <code> matrix[n2.row][n2.col] - matrix[n1.row][n1.col]</code> and <code>matrix[n1.row][n1.col] - matrix[n2.row][n2.col]</code>?</p>