MathContext

Class MathContext

All Implemented Interfaces:
Serializable
public final class MathContext
extends Object
implements Serializable

Immutable objects which encapsulate the context settings which describe certain rules for numerical operators, such as those implemented by the BigDecimal class-

The base-independent settings are:

  1. precision: the number of digits to be used for an operation; results are rounded to this precision
  2. roundingMode: a RoundingMode object which specifies the algori