Instead of using valueOf(long)
and parse()
, you can directly use the BigInteger constructor that takes a string argument:
BigInteger numBig = new BigInteger("8599825996872482982482982252524684268426846846846846849848418418414141841841984219848941984218942894298421984286289228927948728929829");
That should give you the desired value.