As I understand the doc, ParseDouble function made something like :
Double parseDouble(String s) throws ... {
return new Double(Double.valueOf(s));
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The logic is the same, but the return value of Double.valueOf() return a heap allocated Double object, where as parseDouble returns a primitive double. Your code example is not quite correct. The java source reads: