I've looked a lot through here and can't quite find why this line is wrong:
ArrayList <BigInteger> data = new ArrayList();
int [] primes = new int[25];
...
// Some initializing
...
data.get(i) = data.get(i).divide( BigInteger.valueOf( primes[place] ) ); //<----
...
// Rest of the code
Required: variable; Found: value.. What I'm doing wrong?
First, you should fix your Raw Type (and I'd prefer the List interface) like
List<BigInteger> data = new ArrayList<>();
then you need to use set because you can't assign to the return value of a get like that.
data.set(i, data.get(i).divide(BigInteger.valueOf(primes[place])));
Also, it's worth noting that BigInteger(s) are (per the Javadoc) immutable arbitrary-precision integers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With