Luke, I always use BigDecimal for money, and convert to required formats when viewing. Otherwise, if you need to deal with other currencies, you might run into trouble.
My $0.02 Michael Scovetta Computer Associates Senior Application Developer -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Lukas Bradley Sent: Thursday, March 17, 2005 4:41 PM To: [email protected] Subject: Money Class? I'm running (back) into the age old question of representing monetary values in Java. Should I use a float and risk floating point errors, should I use int and hold cents (or pieces of the currency) or should I create a Money Class to handle both of these problems but create bulkier code? Has Commons approached this? I don't need a fully I18N solution, I just need something that will allow for addition, subtraction, and calculation of percentages. Any help or advice appreciated. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
