Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java string to decimal

String strDecimal = "0.00000008880000";
double f = Double.parseDouble(strDecimal);
System.out.println(f);
System.out.println(String.format("%.7f", f));
System.out.println(String.format("%.9f", new BigDecimal(f)));
System.out.println(String.format("%.35f", new BigDecimal(f)));
System.out.println(String.format("%.2f", new BigDecimal(f)));
 
PREVIOUS NEXT
Tagged: #java #string #decimal
ADD COMMENT
Topic
Name
1+1 =