Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to truncate decimals in java

DecimalFormat df = new DecimalFormat(fmt);
df.setRoundingMode(RoundingMode.DOWN);
s = df.format(d);
 
PREVIOUS NEXT
Tagged: #truncate #decimals #java
ADD COMMENT
Topic
Name
2+3 =