round « decimal « Java Data Type Q&A - Programming tutorials and source code examples

round « decimal « Java Data Type Q&A - Programming tutorials and source code examples

瀏覽:1101
日期:2024-05-12
15. Rounding decimal coderanch.com Hi. I want to round the decimal value 5.345 up to 5.35. How is that possible using java.math.BigDecimal? Using the follow code does not round up the last decimal point: float toBePaidTotalAmount = 5.345f; java.math ......看更多