News for hackers. Stuff that matters.
Re:JDK 7 Features by mahmud on Monday September 20, 2010 @09:05AM (#1708620)
Don't use int for money. Use BigDecimal.

I know performance is an issue, but you can always find non-hackish solutions: like a memory upgrade from management, because you're writing safe, clean code :-)

Re:JDK 7 Features by fauigerzigerk on Monday September 20, 2010 @09:33AM (#1708707)
BigDecimal uses 10 times as much memory as an int but I didn't intend to properly model currency amounts anyway.
Re:JDK 7 Features by mahmud on Monday September 20, 2010 @10:32AM (#1708930)
Re:JDK 7 Features by points on Monday September 20, 2010 @11:49AM (#1709237)
Any sane developer will track money in lowest units - eg cents. Rather than Dollars.
Re:JDK 7 Features by mahmud on Monday September 20, 2010 @11:58AM (#1709267)
A sane developer is as rare as a sufficiently smart compiler.