Compare unsigned ints in Java

int cmp = Integer.compareUnsigned(i1, i2);
// cmp = -1  =>  i1 < i2
// cmp =  0  =>  i1 = i2
// cmp =  1  =>  11 > i2

Comments

Be the first to comment!