Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Muaz Bashara   on Nov 30 In Java Category.

  
Question Answered By: Hooriya Khan   on Nov 30

I've already replied to this, but it didn't show up on the list. So
here goes again.

You get an error  because the Double.valueOf() method returns a
Double object (note the capital letter) and you're assigning it to a
double primitive. The correct method to use would be
parseDouble which you mentioned. It should be:

dbl_hw = Double.parseDouble(hw);
dbl_rp = Double.parseDouble(rp);

If that still gives you an error, it must be something to do with J++
, which I've never used

Share: 

 
 


Tagged: