java android convert string to double code example
Example 1: android java string to double
double total = a;
String total2 = String.valueOf(total);
a = variabile inserita dall’utente nel plain text
Example 2: how to convert string to double in android studio
Double lat;
String lat_str = "17.456174";
try {
lat = Double.parseDouble(lat_str);
}catch (NumberFormatException e) {
//lat_string does not contain valid double value
}