Creating BigDecimal Objects
Lines 11–12 declare and initialize BigDecimal
variables principal
and rate
using the BigDecimal static
method valueOf that receives a double
argument and returns a BigDecimal
object that represents the exact value specified.
Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.