Java, comparing BigInteger values
<pre><code>BigInteger bigInteger = ...;


if(bigInteger.longValue() &gt; 0) {  //original code
    //bigger than 0
}

//should I change to this?
if(bigInteger.compareTo(BigInteger.valueOf(0)) == 1) {
    //bigger than 0
}
</code></pre>

<p>I need to compare some arbitary BigInteger values. I wonder which approach is correct. Given the above code which one should be used? The original code is on the top.. I am thinking to change it to the second approach.</p>
