converting a string into adouble java code example Example: java string to double Double d = Double.valueOf(String str);