Compare unsigned longs in Java

int cmp = Long.compareUnsigned(l1, l2);
// cmp = -1  =>  l1 < l2
// cmp =  0  =>  l1 = l2
// cmp =  1  =>  l1 > l2

Comments

Be the first to comment!