DecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance();
symbols.setDecimalSeparator('.');
DecimalFormat df = new DecimalFormat("#.##", symbols);
df.setRoundingMode(RoundingMode.FLOOR);
df.setGroupingUsed(false);
df.format(1.2345); // 1.23
Last active
May 25, 2017 12:23
-
-
Save ssledz/b0880907bdb9a907c69ba951f949a664 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment