I want to do a few preliminary calculations using BigDecimal,
but I must be doing something wrong.
At the beginning of the program I have
import java.math.MathContext;
import java.math.BigDecimal;
Then when I try to construct
MathContext mathContext=new MathContext(MathContext.DECIMAL128); //precision 34 digits
BigDecimal bigDecimal=new BigDecimal(someLong,mathContext);
I get the message
cannot find symbol constructor MathContext(java.math.MathContext)
on the first of the two lines.
What am I doing wrong?
It evidently cannot find the integer DECIMAL128 in MathContext.
And I really do have a dot between MathContext and DECIMAL128.