All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.roguewave.examples.money.currency.v1_0.Example1
double
or float
have
built-in rounding errors.
public Example1()
public static void main(String args[])
java com.roguewave.examples.money.currency.v1_0.Example1
Output should appear as follows:
using BigDecimal... account balance: 0.00 balances using double... account balance: 6.661338147750939E-16 does not balance using BigDecimal from double... account balance: 0.00000000000000002081668171172168513294309377670288085937500 does not balance
protected static void usingDecimal()usingDouble
protected static void usingDouble()usingDecimalFromDouble
protected static void usingDecimalFromDouble()
All Packages Class Hierarchy This Package Previous Next Index