Excuse me, I have two questions about the Listing 6.1 of page. 204
1.I have seen the errata list. There is a correction in Listing 6.1 of page. 204
Code:
204, listing 6.1, switch the lines "if (resultSet.wasNull())..." and "BigDecimal valueInUSD"
Maybe my English is too poor to realize the meaning of "switch the lines" ,
could anyone please tell me what the "switch the lines" actully means?
2.In the method "nullsafeSet", there are some codes like follows:
Code:
MonetaryAmount anyCurrency = (MonetaryAmount)value;
Why could the object "value" directly cast into an object of type "MonetaryAmount"
and use anyCurrency as a parameter of method "convert"?
Does class "MonetaryAmount" have any relationship with class "BigDecimal"?
Thanks for all your reply.