how to convert string 41.5 to double code example Example: java string to double Double d = Double.valueOf(String str);