Answers for "decimal string to int"

67

convert string to int java

String myString = "1234";
int foo = Integer.parseInt(myString);
Posted by: Guest on February-26-2020
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 "decimal string to int"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language