Check out example codes for "how to extract data from delimited text file in java". It will help you in understanding the concepts better.

Code Example 1

double latitude = Double.parseDouble(tokens[0]);
double longitude = Double.parseDouble(tokens[1]);

Learn ReactJs, React Native from akashmittal.com