N
Nash
Hi All
Suppose I have 2 bigintegers b1 and b2. Is comparing the two
bigintegers using their compareTo() same as converting them to their
hexadecimal string representations and then comparing them?
For eg.
BigInteger b1 = ...;
BigInteger b2 = ...;
String hexb1 = b1.toString(16);
String hexb2 = b2.toString(16);
Is b1.compareTo(b2) equivalent to hexb1.compareTo(hexb2);
TIA
A
Suppose I have 2 bigintegers b1 and b2. Is comparing the two
bigintegers using their compareTo() same as converting them to their
hexadecimal string representations and then comparing them?
For eg.
BigInteger b1 = ...;
BigInteger b2 = ...;
String hexb1 = b1.toString(16);
String hexb2 = b2.toString(16);
Is b1.compareTo(b2) equivalent to hexb1.compareTo(hexb2);
TIA
A