Java Reference
In-Depth Information
various rounding mode constants. These constants are described in
Table 4-9
.
this class to correctly perform the invoice calculations that were presented in
Listing
Listing 4-32.
BigDecimal
-based invoice calculations not leading to confusing results
import java.math.BigDecimal;
import java.math.RoundingMode;
class InvoiceCalc
{
public static void main(String[] args)
{