Converting Strings to Numeric Primitive Data Types
To convert a string which is containing digits to a primitive data type, wrapper classes can help. parseXxx method can be used to convert a String to corresponding primitive data type.
String value = "532";
int d = Integer.parseInt(value);
String value = "3.14e6";
double d = Double.parseDouble(value);