Check out example codes for "parsing a double java". It will help you in understanding the concepts better.

Code Example 1

double val = Double.parseDouble(str);

Learn ReactJs, React Native from akashmittal.com