SyntaxFix
Write A Post
Hire A Developer
Questions
Biginteger is an immutable class. You need to explicitly assign value of your output to sum like this:
Biginteger
sum = sum.add(BigInteger.valueof(i));