azi98
asked on
Using BigInteger in Java to calculate unsigned long value
I need to convert this C# code to Java where __count is a ULong type and STR_LENGTH=8. How do I use BigInteger here.
static test()
{
int index;
// compute ( 10 ^ STR_LENGTH ) - 1
__count= 1UL;
for (index = 0; index < STR_LENGTH; ++index)
{
__count*= 10UL;
}
__count--;
}
static test()
{
int index;
// compute ( 10 ^ STR_LENGTH ) - 1
__count= 1UL;
for (index = 0; index < STR_LENGTH; ++index)
{
__count*= 10UL;
}
__count--;
}
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.