Answers for "java string to decimal"

1

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)));
Posted by: Guest on July-27-2021

Code answers related to "java string to decimal"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language