<<< Methods of the BigDecimal class | Index | RoundingMode.HALF_UP >>> |
RoundingMode enumeration specify a rounding method:
import java.math.RoundingMode;
Two of the values in the RoundingMode enumeration, such as
HALF_UP // Most commonly used rounding scheme HALF_EVEN // "Banker's rounding" often used in the USA
For example,
subtotal.setScale( 2, RoundingMode.HALF_UP );
<<< Methods of the BigDecimal class | Index | RoundingMode.HALF_UP >>> |