SyntaxFix
Write A Post
Hire A Developer
Questions
Try this, BigDecimal bdVal = new BigDecimal(str);
If you want Double only then try Double d = Double.valueOf(str); System.out.println(String.format("%.3f", new BigDecimal(d)));