title: How to Compare a long value is equal to Long value
body: <pre class="lang-java prettyprint-override"><code>long a = 1111;
  Long b = 1113;
      
  if (a == b) {
      System.out.println(&quot;Equals&quot;);
  } else {
      System.out.println(&quot;not equals&quot;);
  }
  </code></pre>
  <p>The above code prints <code>&quot;equals&quot;</code>, which is wrong.</p>
  <p>How do I check whether a <code>long</code> value equals a <code>Long</code> value?</p>