BigDecimal v = new BigDecimal(0.0d);
BigDecimal av = new BigDecimal(0.1d);
av = av.setScale(2, RoundingMode.HALF_EVEN);
for (int i = 0; i < 10; i++) {
v = v.add(av);
System.out.println(v);
}
ref: http://www.narisa.com/forums/index.php?showtopic=12589&st=0
Thursday, June 4, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment