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